
Week 6 - Conditional Statements in Python
Authored by Rommel Sario
Instructional Technology
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
x is greater than 10
x is 10 or less
No output
Error
Answer explanation
Since x = 7, the condition x > 10 is False, so the code in the else block is executed.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
Even
Odd
5
No output
Answer explanation
Since 5 % 2 != 0, the condition is False, so the else block prints Odd.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
x is 20 or more
x is between 10 and 20
x is 10 or less
No output
Answer explanation
Since x = 15, the first condition (x > 10) is True, and the nested condition (x < 20) is also True, so it prints the message in the second if block.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
Young adult
Not a young adult
Error
No output
Answer explanation
Both conditions (age >= 18 and age < 30) are True, so the if block is executed.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
A
B
C
No Output
Answer explanation
The condition score >= 90 is False, but score >= 80 is True, so it prints B.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
Equal
Not equal
Error
No output
Answer explanation
Since x is not equal to y, the else block runs and prints Not equal.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
Hot
Warm
Cold
No output
Answer explanation
The first condition (temp > 50) is False, but the second condition (temp > 30) is True, so it prints Warm.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Software engineering
Quiz
•
University
15 questions
PEOPLE MEDIA_SOCRATES
Quiz
•
7th Grade - University
10 questions
ESL Vocabulary: Technology 1
Quiz
•
University - Professi...
10 questions
Simple Past.
Quiz
•
University
20 questions
Air Cargo Management 01
Quiz
•
University
15 questions
ASSESSMENT IN LEARNING (BEED)
Quiz
•
University
10 questions
EdTech
Quiz
•
University
20 questions
MOODLE LMS
Quiz
•
10th Grade - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Instructional Technology
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University