
Mastering Python Control Structures
Authored by Junel Ventura
Information Technology (IT)
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: if 5 > 3: print('True') else: print('False')?
False
Maybe
Not Sure
True
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct syntax for an if statement in Python?
if (condition) do_something
if condition: do_something
if: condition do_something
if condition do_something;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code: x = 10; if x < 5: print('Low'); elif x < 15: print('Medium'); else: print('High')?
High
Low
Very High
Medium
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, which operator is used for logical AND in conditions?
not
||
and
&&
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression: True and False?
True
False
Neither True nor False
False and True
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: if 10 > 5: print('A'); if 10 < 5: print('B')?
C
A
B
D
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a chained if statement?
if (condition1) { // code } else { // code }
if (condition1) { // code }
if (condition1) { // code } else if (condition2) { // code } else { // code }
if (condition1) { // code } else if (condition2) { // code } else if (condition3) { // code }
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
20 questions
ASESMEN DIAGNOSTIK INFORMATIKA KELAS 9
Quiz
•
9th Grade - University
20 questions
FINALS summative test in TRENDS
Quiz
•
12th Grade - University
20 questions
Quis SIG
Quiz
•
University
15 questions
Quiz sobre Integração de Sistemas de Informação
Quiz
•
University
15 questions
Web Application - PHP Repetition
Quiz
•
University
20 questions
Flutter Quiz#1
Quiz
•
University
20 questions
Desenvolvimento sis 2tri
Quiz
•
12th Grade - University
16 questions
HTML Level 1
Quiz
•
8th Grade - University
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 Information Technology (IT)
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