ROYGBIV Guessing Game
Under the src folder, this program is divided into lessons (starting at a_).
What does the Final Program Do?
- Randomly picks from a list
- Handles user input with conditionals
- Tracks the score during a user's session
- Starts a timer as soon as the game starts
The program randomly chooses an item (color) from the list (colors from the rainbow) and puts the item into a variable. The program pauses until the user types in a color, i.e. red, orange, yellow, green, blue, indigo, or violet. Based on the name of the color entered, the program will tell the user if they guessed correctly or not.
Just like golf, the lower the score, the better! For example, once d_timer_roygbiv.py is executed, each guess made by the user is added to the score. Once, the user guesses correctly, the program returns the total amount of guesses made.
From the moment the first guess is made, the timer starts counting. The actual timer may vary depending on the Python version.