dotfiles/.config/Code/User/History/-4c5b63ed/5jOS.py

15 lines
349 B
Python
Raw Normal View History

2024-09-09 16:59:28 +05:00
import random
num = random.randint(1, 100)
for i in range(5):
guess = int(input('guess the number: '))
if guess == num:
print('congratualtions you guessed correctly: ')
break
elif guess > num:
print('too high try again: ')
else:
print('too low try again: ')
print('you failed the number was ', num)