list1 = [5,3]
list2 = ['-','+']
list3 = [3,1]
#Do your code below
for i in range(0,len(list1)):
flag1 = True
while flag1 == True:
print('%s %s %s = ?'%(list1[i],list2[i],list3[i]))
print('Enter the answer for the above equation')
ans = int(input())
if list2[i] == '-':
check = list1[i] - list3[i]
if list2[i] == '+':
check = list1[i] + list3[i]
if ans == check:
print('The answer is correct')
else:
print('The answer is wrong')
continue
flag1 = False