import random

def additionProblem(topNumber, bottomNumber):
  result = False #step 1

  print("\n\n\n     ", topNumber, "+", bottomNumber, "= ", end = "") 
  userAnswer = int(input()) 
  
  theAnswer = topNumber + bottomNumber 
  if theAnswer == userAnswer: 
    print("      Correct!")
    result = True
  else:
    print("      Very good, but a better answer is", theAnswer)
    
  return result #step 3
# additionProblem ends here

# main program starts here 
score = 0
if additionProblem(random.randint(0, 9), random.randint(0, 9)): score += 1
if additionProblem(random.randint(0, 9), random.randint(0, 9)): score += 1
if additionProblem(random.randint(0, 9), random.randint(0, 9)): score += 1
if additionProblem(random.randint(0, 9), random.randint(0, 9)): score += 1
if additionProblem(random.randint(0, 9), random.randint(0, 9)): score += 1

print("\n      TOTAL SCORE:", score, "out of 5")