Created
June 27, 2025 10:27
-
-
Save Looons404/a2ef7f7183f6c6ba802539a266091b9f to your computer and use it in GitHub Desktop.
Simple guess the number game in python.
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
| import random | |
| number = random.sample(range(1, 10), 1)[0] | |
| user = int(input("Entrez un nombre entre 1 et 9: ")) | |
| if user == number: | |
| print("Congrat, you've found the correct number !") | |
| else: | |
| print("Sorry, this isn't the right number.") | |
| print(f"The number was {number}.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment