← Quiz: Python Conditions: all 13 questions
Quiz: Python Conditions · Question 8 of 13
What does this print? (code)
What does this print?
n = 15
if n % 3 == 0:
print("A", end="")
if n % 5 == 0:
print("B", end="")
- A.A
- B.B
- C.AB
- D.Nothing
Answer & explanation
Correct answer: AB
Two separate ifs: both are checked.
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 →