Created
June 8, 2024 08:37
-
-
Save ariedov/a17a972c346df431d555a768bab0da54 to your computer and use it in GitHub Desktop.
Simple python game "Guess the number"
This file contains 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 | |
rand = random.randint(0, 10) | |
print(f"Я загадав число!") | |
while True: | |
guess = int(input("Вгадуй!")) | |
print(f"Ти вважаєш що {guess}?") | |
if guess == rand: | |
print("Вгадав!") | |
break | |
if guess != rand: | |
print("Не вгадав, спробуй ще!") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment