1
I am having trouble understanding why this code isn't working, could someone please help me out?
Matt359 (0)

https://repl.it/@Matt359/My-Quiz I am having trouble understanding why this code isn't working, could someone please help me out?

You are viewing a single comment. View All
1
mwilki7 (111)

@Matt359
You could try pairing the question with an answer using pairs.
For instance:

q1 = ('What are clouds made of?', 'Water')
q2 = ('What is Aurora Borealis mean?', 'Northern Lights')
# q1[0] gets the question, q1[1] is the answer
# same thing for q2, q3...and so on

answer = input(q1[0])

if answer == q1[1]:
    print("Correct")
else:
    print("Incorrect")

answer = input(q2[0])

if answer == q2[1]:
    print("Correct")
else:
    print("Incorrect")