Created
February 25, 2016 09:03
-
-
Save davidbj/6eea2f32e5e5568b2cf9 to your computer and use it in GitHub Desktop.
Guess the number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fun(): | |
| """Guess the number. | |
| Three chances Yo. | |
| """ | |
| constant=4 | |
| for i in range(3): | |
| number = int(input("Please input a number:")) | |
| if num == constant: | |
| msg = "congratulations! you win!" | |
| return msg | |
| else: | |
| msg = "Oops! you fail!" | |
| return msg | |
| fun() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment