
Quiz on Flow of Control in Python

Quiz
•
Computers
•
12th Grade
•
Hard
sapna Pradeep
FREE Resource
41 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary concept of sequence in Python?
Executing statements in random order
Executing statements one after another
Executing statements only when conditions are met
Executing statements based on user input
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which control structure allows for decision making in Python?
Loop
Function
If..else statement
Variable
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: print(5 - 7)?
0
2
5
-2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'elif' statement do in Python?
Repeats the if statement
Ignores the if statement
Checks another condition if the first is false
Ends the if statement
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of indentation in Python?
To comment out code
To define blocks of code
To create variables
To make the code look good
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a looping construct in Python?
Function
For loop
If statement
Variable assignment
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code: for i in range(3): print(i)?
0 1 2 3
1 2
1 2 3
0 1 2
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
Computer Science Pre-Assessment Quiz

Quiz
•
9th - 12th Grade
44 questions
Python Test 2

Quiz
•
7th - 12th Grade
40 questions
Introduction to Microsoft Word

Quiz
•
8th - 12th Grade
40 questions
Programming Techniques

Quiz
•
12th Grade
42 questions
App inventor

Quiz
•
7th Grade - University
39 questions
2.3 - Robust Programs

Quiz
•
KG - University
40 questions
CodeHS Web Design - HTML - Mid-Unit Test

Quiz
•
9th - 12th Grade
46 questions
BTEC Information Technology: Unit 1 Learning Aim A

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade