import random
def game(nn, optt):
s1 = 1
s2 = 10**nn
i = random.randint(s1,s2)
j = random.randint(s1,s2)
ans=answer(i,j,optt)
print ("Nice") if ans else print("Bad")
def answer( i,j, optt):
d = {'+':(lambda x,y:x+y),'-':(lambda x,y:x-y),
'*':(lambda x,y:x*y)}
print(i," ", optt," ",j," = ?")
a=int(input("\nОтвет: "))
return a == d[optt](i,j)
for i in range(100):
n=int(input("\nПорядок: "))
sim=input("\nОперация: ")
game(n,sim)