So as part of the exercises I was following from https://www.practicepython.org/ one of the exercises was to create a guessing game: Generate a random number Ask the user to guess the number and print Tell them whether they guessed to high or low Keep a track of how many guesses they had and tell them […]Read more "Guessing Game"
No BS: using a ‘while True’ loop and a ‘continue’ line in an exception is good because it gives the user another go at an input (if that’s what it was used for) without having to go through the whole program again. With BS: So I just put together a quick program to check […]Read more "Basic Exceptions"
No BS: Given a .txt file, count the appearance of each word (ignoring case) and do either: Print a full list sorted by alphabetical order. Print a list of the top 20 most common words. Taken from Google’s Python class: https://developers.google.com/edu/python/dict-files (bottom of the page). Once I’ve figured out how to display code snippets correctly […]Read more "Word/Count Dict (Part 1)"