Ask coding questions

← Back to all posts
Questions about right and wrong code

Im making a project about a quiz. I need to know how to do the right or wrong answer for my project called "Quiz Master". Please respond as soon as you can.

xXJohnDoeXx (6)

You could use if question == 'the answer': #what you want it to do if correct, if that works please mark this as the answer.

Dunce (70)

What exactly are you looking for? Do you want to subtract a point when a question is answered incorrectly? Or do you want to give multiple options, or what?

Puffy2017 (10)

Hello @EMMAJACOBS, to add 'Correct' or 'Incorrect' Answers you can use the code
user_reply = input ('Question')

if user_reply == 'Answer1':
  print ('CORRECT')                                  
elif user_reply =='Answer2':
  print ('INCORRECT')

I hope this comment finds you well

I added my project im working on


It did not work im still looking for answers