Practice Python

follow us in feedly Atom feed XML

Weekly beginner Python exercises

10 April 2014

Guessing Game One Solutions

Exercise 9

Generate a random number between 1 and 9 (including 1 and 9). Ask the user to guess the number, then tell them whether they guessed too low, too high, or exactly right. (_Hint: remember to use the user input lessons from the very first exercise

Extras:

Sample solution

Great example of a solution including both extras!

And another:

And another, with lots of helpful text!

comments powered by Disqus