from random import randint
finish = False
while not finish:
x = randint(0,10)
y = randint(0,10)
for i in range(4):
z = int(input((f'{x} * {y} = ')))
if z == x*y:
print("Верно!")
finish = True
break
else:
print(f"Неверно. Осталось попыток: {3-i}.")
if finish == False:
print("Перезапуск.")
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
from random import randint
finish = False
while not finish:
x = randint(0,10)
y = randint(0,10)
for i in range(4):
z = int(input((f'{x} * {y} = ')))
if z == x*y:
print("Верно!")
finish = True
break
else:
print(f"Неверно. Осталось попыток: {3-i}.")
if finish == False:
print("Перезапуск.")