top of page
  • Writer: VC Healy
    VC Healy
  • Sep 29, 2020
  • 1 min read

A counter that counted the instances of a word in a list was written in python/

This progressed this to reading the contents of a text file, getting the ten most common words from the file as thee result. The text in the file just random content and I thought this to sensible.


The next step reading from a set of files, giving the top ten most common words from each file.


Three imports were required re.findall, os.system and collections.Counter.Not for speed of code but for knowing exactly what is being used, is why I only import the methods on a module. Only in small code of course.



 
 
  • Writer: VC Healy
    VC Healy
  • Sep 29, 2020
  • 1 min read

There is a little Python idea to create a program that determines if a number input by a user is Odd or Even. This is to help develop basic programming. Anyone that knows me, they will know I am more of a find and fix problems in code.


I gave this a bash, from scratch without looking at any demo/tutorials/books/etc.


Okay, that was simple. Stick in an integer and away it goes.


Coming back to my original behaviour, I have found now that I have written this I am looking at problems in the code. Not what I have written but what is missing to make the code a bit more robust.


How does the user know what the program does?

- Clear screen command to clear the console was placed at the start.

- A header that states what the code does and what the user should do.

What if the input is not an integer?

A try-except captures if a ValueError is found.

A message to the user shows their input and that it was not a number

There is a small pause and then the program restarts

What if the user wants to do this more than once?

After a successful check of a users input, there was a pause, and the program restarts

Is there a clean way for the user to exit the program?

The ability for the user to enter '0' to exit the program, as detailed in the header.




 
 
  • Writer: VC Healy
    VC Healy
  • Sep 29, 2020
  • 1 min read

When one of the furry family members has to go upstairs, it is never an easy thing to deal with. You lose a piece of your heart and have to help the others through that time. Humans and furballs.


This was my weekend when our family furry was found to so ill that there would have been nothing a drawn out time of more pain.


I miss him as do many others because he was a gentle lad that had a dredful time in his first years of life before being rescued by a friend in Romania and then coming to us to spend five and a years with us in Scotland doing what he should been doing from the start. Enjoying life as a dog and not sunject to a dogs-life.


RIP Rusty, a friend and member of my family

 
 

© 2020 by Vincent Healy. Proudly created with Wix.com

bottom of page