Free to use. Edit it, share it and hand it out to your students.
Oak National Academy
12 questions
A ___ compares two values and produces the result of True or False.
Match the arithmetic operator to the symbol:
Write the if statement command to check if the value stored in the variable called num is 10 or more.
What will be displayed if score is 5?if score < 5: print ("You lose")elif score <= 10: print ("Not bad!")else: print ("You win")
What will be displayed if score is 10?if score < 5: print ("You lose")elif score <= 10: print ("Not bad!")else: print ("You win")
What will be displayed if score is 11?if score < 5: print ("You lose")elif score <= 10: print ("Not bad!")else: print ("You win")
What is the purpose of logical operators in programming?
Which of the following is True when both conditions are True?
The expression (5 > 3) and (10 < 20) evaluates to ___.
Which logical operator is used to reverse the result of a condition?
The expression (8 < 3) and (5 > 2) evaluates to ___.
What will be displayed if the user inputs "king" for value and "hearts" for suit?if value == "king" and suit == "hearts": print("Match") else: print("Not a match")