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
Which of the following is the correct syntax for a simple `if` statement in Python?
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 Wayground
10 questions
ครอบครัวของ if

Quiz
•
9th - 12th Grade
20 questions
Python Conditionals Practice

Quiz
•
9th - 12th Grade
10 questions
CS1310 Unit 1 Quizziz

Quiz
•
12th Grade
20 questions
Javascript Conditional Statements

Quiz
•
9th - 12th Grade
20 questions
struktur kontrol bahasa pemrograman pascal

Quiz
•
12th Grade
11 questions
Python Projects Quiz

Quiz
•
6th Grade - University
16 questions
Loops

Quiz
•
5th - 12th Grade
11 questions
Python Boolean

Quiz
•
11th - 12th 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
9/11 Experience and Reflections

Interactive video
•
10th - 12th 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
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade