questions = [ ["How many legs does a dog have? ", "4"], ["What sound does a cat make? ", "meow"], ["What is a baby sheep called? ", "lamb"], ] score = 0 for item in questions: answer = input(item[0]) if answer == item[1]: print("Correct!") score = score + 1 else: print("Wrong. The answer was", item[1]) print("Your score is", score, "out of 3")