Homework for Unit 1-2
Here is the homework assignment for Unit 1-2.
quesCount = 0
score = 0
# Use a dictionary for the questions
quesList = ["2+2", "2*2", "2*4", "2/2"]
# Use a dictionary for the correct solutions
soluList = ["4", "4", "8", "1"]
quesAmount= len(quesList)
if quesCount <= quesAmount:
print(quesList[quesCount] + "\n")
guess = input()
if (guess == soluList[quesCount]):
score+=1
print("Correct! Score: ")
else:
print("Incorrect! The correct answer was " + soluList[quesCount] + "\n")
quesCount += 1
print("Final score: " + str(score))