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
15 questions
Iteration

Quiz
•
9th - 12th Grade
11 questions
Java Boolean Statements

Quiz
•
11th Grade
15 questions
JavaScript#1

Quiz
•
9th - 12th Grade
12 questions
Syntax and Logic Errors

Quiz
•
9th - 11th Grade
13 questions
Intro to IF statements

Quiz
•
KG - University
10 questions
Excel If function WSC 4.2.3

Quiz
•
7th Grade - University
10 questions
Python Input/Output

Quiz
•
9th - 12th Grade
15 questions
ONE 6th FORM Introduction to Python Basics

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade