
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
Math G7 Chapter 3 Mastering Significant Figures and Estimation
Quiz
•
7th 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
16 questions
Backup dan Restore Data
Quiz
•
12th Grade - University
20 questions
Desenvolvimento sis 2tri
Quiz
•
12th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University