Your turn!
Following along with the provided code is a great way to learn through practice.
A better way is by challenging yourself to achieve tasks. Hence, I challenge you to achieve the following task:
Create a console application that does the following:
- Sets the title of the terminal window to GUESSING GAME!
- Generates a random integer value between 1 and 20
- Tells the player that they have three chances to figure out that number
- After each player’s trial, it should then do the following:
- If the player figured out the number, the program displays, in green text, Congratulations, you won!, along with the number of trials it took the player to figure it out
- If the player was not able to figure out the number within the three granted trials, the program should display, in red text, Better luck next time! The number to be guessed was along with the value to be guessed
- If the player hits Enter without providing a number, the program should consider that the...