What is the output? python Copy Edit x = 5 if x > 3: print("Yes") else: print("No")

Python Conditional Statements Quiz

Quiz
•
Information Technology (IT)
•
7th Grade
•
Easy
Fadi Fadi
Used 1+ times
FREE Resource
36 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Error
5
No
Yes
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is the correct way to write an if statement?
if > x 10:
if x > 10 then
if x > 10:
if (x > 10)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code print? python Copy Edit age = 10 if age >= 18: print("Adult") else: print("Child")
Adult
Error
Child
Teen
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to check a second condition?
else if
elif
then
elseif
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result? python Copy Edit x = 7 if x % 2 == 0: print("Even") else: print("Odd")
7
Error
Odd
Even
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true about if statements?
if must be written in uppercase
if must end with a colon :
if must include else
if must be the last line
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be printed? python Copy Edit score = 85 if score > 90: print("A") elif score > 80: print("B") else: print("C")
B
C
85
A
Create a free account and access millions of resources
Similar Resources on Quizizz
39 questions
Networking Week 6

Quiz
•
3rd Grade - University
40 questions
TIK CLASS 7

Quiz
•
7th Grade - University
34 questions
Ujian Semester Ganjil Informatika

Quiz
•
7th Grade
35 questions
UH Materi Ms. Word

Quiz
•
7th Grade - University
41 questions
Computer Basics Quiz

Quiz
•
7th Grade
31 questions
F3ICS

Quiz
•
7th Grade
40 questions
Latihan Ujian Semester TIK

Quiz
•
7th Grade
35 questions
ms excel kelas 6

Quiz
•
6th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
43 questions
LinkIt Test - 24-25_BM4_7th

Quiz
•
7th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
14 questions
One Step Equations

Quiz
•
5th - 7th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
37 questions
7th Grade Summer Recovery Review

Quiz
•
7th Grade
18 questions
Informational Text Vocabulary

Quiz
•
7th - 8th Grade