- 216
- 48
Python:
import random
random_number = random.randint(1, 100)
while True:
user_number = int(input("Enter number (1, 100): "))
if user_number >= random_number:
print(f'You win! number - {random_number}')
break
elif user_number < random_number:
print(f'You lose! number - {random_number}')