Which of the following is the correct syntax for a simple `if` statement in Python?
PCEP Section 2a: Make decisions with if instruction

Quiz
•
Computers
•
12th Grade
•
Medium
Misti McDaniel
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
if x > 10 then print("x is greater than 10")
if x > 10: print("x is greater than 10")
if (x > 10) { print("x is greater than 10") }
if x > 10 print("x is greater than 10")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Small
Large
Error
5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to check multiple conditions in sequence after an initial `if` statement in Python?
elseif
elif
else if
when
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Positive
Negative
Zero
Nothing
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to nest an `if` statement inside another `if` statement in Python?
if x > 0: if y > 0: print("Both positive")
if x > 0 then if y > 0 then print("Both positive")
if x > 0: { if y > 0: print("Both positive") }
if x > 0: if y > 0 print("Both positive")
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to print "Teenager" if the variable `age` is between 13 and 19 (inclusive). Which of the following code snippets will achieve this?
if age >= 13 and age <= 19: print("Teenager")
if age > 13 and age < 19: print("Teenager")
if 13 < age < 19: print("Teenager")
if age == 13 or age == 19: print("Teenager")
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A
B
C
F
Create a free account and access millions of resources
Similar Resources on Quizizz
11 questions
Python Boolean

Quiz
•
11th - 12th Grade
17 questions
Python 1

Quiz
•
1st Grade - University
20 questions
Python Conditionals Practice

Quiz
•
9th - 12th Grade
10 questions
GDScript Quiz - Lesson 3 - Conditional statements & Iteration

Quiz
•
12th Grade
12 questions
IDT UNIT 3

Quiz
•
9th - 12th Grade
10 questions
ครอบครัวของ if

Quiz
•
9th - 12th Grade
11 questions
Co już wiemy ? Python

Quiz
•
12th Grade - Professi...
15 questions
Python

Quiz
•
6th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University