← Quiz: Python Conditions: all 13 questions
Quiz: Python Conditions · Question 4 of 13
What is wrong with this code? (code)
What is wrong with this code?
if marks >= 40
print("Pass")
- A.Nothing
- B.The colon after the condition is missing
- C.print needs brackets
- D.
= is not valid in Python
Answer & explanation
Correct answer: The colon after the condition is missing
Every if line must end with a colon.
Can you get the rest right without peeking?
Take the timed Quiz: Python Conditions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →