Python If Statements - and or not

Quiz
•
Computers
•
11th Grade
•
Medium
Alexander Anderson
Used 8+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will execute the block of code if the variable `a` is equal to 10?
if a = 10:
if a == 10:
if a != 10:
if a > 10:
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which character must be at the end of the line for if?
:
;
.
{
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code snippet print:
equal
equal
not equal
not equal
syntax error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code snippet print:
Yes
indentation error
yes
10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to check if two values are not equal in Python?
!==
!=
==
<>
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write an if statement to check if `x` is greater than 10?
if x > 10:
if x is > 10:
if x >> 10:
if x gt 10:
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
not ( 7 == 8 )
True
False
Error
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python IF Statements

Quiz
•
9th - 12th Grade
10 questions
Python Boolean and If

Quiz
•
9th - 12th Grade
10 questions
C#

Quiz
•
11th Grade
13 questions
11 B

Quiz
•
11th Grade
9 questions
Python Basics Quiz for KS3

Quiz
•
11th Grade - University
10 questions
J277 - 2.2 - Functions in Python

Quiz
•
10th Grade - University
10 questions
Python - Flow control

Quiz
•
11th Grade
10 questions
Python Flow Control

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade