0
Why it is wrong?
if question ==yes: print("your question is correct")
2 Answers
+ 2
if u want to run print, if question == yes (assuming that yes and question are variables contains same data type) u r missing the indentation. In Python we use indentation to define /mark the scope/block.
if question ==yes:
print("your question is correct")
+ 1
That code could be wrong for 2 reasons.
1- The indentation (as already explained by Eranga).
2- The answer to the question (yes) is probably a string and a string is always written between double quotes like this: "yes"
The code should look like this:
if question == "yes":
print("your question is correct")