Explore

Quiz: Selection - Using IF/ELSE to Choose Paths
OCR GCSE J277 Computer Science specification
Ready to start this lesson?
Sign in to track your progress. 11 steps including 9 interactive questions.
Sign In to Start LearningStudents also studied
Browse allSteps in this lesson (11)
Building on what you've learned about inputs, outputs, and sequence, let's test your understanding of selection using IF/ELSE to make decisions in programs!
What is the purpose of an IF statement in programming?
Start the lesson to answer this multiple choice question
Which of the following are valid conditions in an IF statement? (Select all that apply)
Start the lesson to answer this multi-select question
An IF statement evaluates a condition and runs the code inside it only if the condition is {{blank0}}.
Start the lesson to answer this fill in the blank question
Match the items on the left with their correct pairs on the right
Start the lesson to answer this matching question
Match the items on the left with their correct pairs on the right
Start the lesson to answer this math equation question
Match the items on the left with their correct pairs on the right
Start the lesson to answer this code completion question
Match the items on the left with their correct pairs on the right
What will the following code output? if 10 > 5: print('Yes') else: print('No')
Start the lesson to answer this multiple choice question
Which of the following outputs are possible for this code? if 8 == 8: print('Match') else: print('Mismatch')
Start the lesson to answer this multi-select question
The ELSE block runs when the IF condition is {{blank0}}.
Start the lesson to answer this fill in the blank question

Want to Learn More?
Get personalised lessons, quizzes, and instant feedback from your AI tutor.
Explore More Topics