# -*- coding: utf-8 -*-
import random
print("Welcome to the game! Please, choose difficulty")
difficulty = input("Just write \"hard\", \"medium\", or \"low\".")
if difficulty == "hard":
counterRepetitions = 10
elif difficulty == "medium":
counterRepetitions = 5
else:
counterRepetitions = 3
while 0 < counterRepetitions:
strAnswer = '{}+{}'.format(random.randint(1,100),random.randint(1,100))
intAnswer = eval(strAnswer)
anonAnswer = (0)
print('Let\'s try solve this - {}'.format(strAnswer))
anonAnswer = int(input())
if anonAnswer == intAnswer:
print("That's right! Good job!")
else:
print("False, this is wrong. Try again.")
print("If you want to see result - write \"yes\". If not - just press Enter")
answer = input()
if answer == "yes" or answer == "yes" or answer =="y" or answer == "да":
print('Result is {}'.format(intAnswer))