79153345

Date: 2024-11-03 18:12:07
Score: 2
Natty:
Report link

I have modified your code a bit and it works perfectly fine i guess i mean according to your requirement.

five_ans1 = input ("What is the answer?")

five_ans2 = input ("What is the answer?")

list_q5_mark1 = ["answercondition1", "another way to write answercondition1"] list_q5_mark2 = ["answercondition2", "another way to write answercondition2"] #the 'another way to write' is just to ensure the user doesn't get an false incorrect. It's the same thing, without spaces.

if five_ans1 and list_q5_mark1 in five_ans2 in list_q5_mark2: print ("correct! you got both") elif five_ans1 in list_q5_mark1: print ("correct! it was also answercondition2") elif five_ans2 in list_q5_mark2: print ("correct! it was also answercondition1") else: print ("incorrect")

keep the indenation properly and check it out.

Reasons:
  • Blacklisted phrase (0.5): check it out
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ravi Teja Bhagavatula