
Mastering Python Control Structures

Quiz
•
Information Technology (IT)
•
University
•
Hard
Junel Ventura
Used 3+ times
FREE Resource
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 }
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Programming Fundamentals Quiz

Quiz
•
University
20 questions
2F-1 | Python Quiz | 14/10/2024

Quiz
•
University
15 questions
PPL 223 - (QUIZ 3) Data Types and Structures

Quiz
•
University
20 questions
Python

Quiz
•
University
20 questions
PROGRAMMING 1

Quiz
•
University
16 questions
G 10- Understanding System Software

Quiz
•
10th Grade - University
25 questions
PPL (Quiz 5) Procedures and Functions

Quiz
•
University
20 questions
PROGRAMMING 2 MIDTERM EXAM TRUE OR FALSE (2024-25))

Quiz
•
University
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 Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University