Quiz on Flow of Control in Python

Quiz on Flow of Control in Python

12th Grade

41 Qs

quiz-placeholder

Similar activities

Edx GCSE Python 02

Edx GCSE Python 02

12th Grade

40 Qs

Unit 2 review

Unit 2 review

9th - 12th Grade

42 Qs

Express Course: Unit One

Express Course: Unit One

5th - 12th Grade

38 Qs

Final Quiz

Final Quiz

12th Grade

37 Qs

Python set 2

Python set 2

9th - 12th Grade

42 Qs

ECS Unit 4 Programming

ECS Unit 4 Programming

11th - 12th Grade

37 Qs

CodeHS APCSP Python Control Structures

CodeHS APCSP Python Control Structures

11th - 12th Grade

37 Qs

AP CSA Review Set #1

AP CSA Review Set #1

9th - 12th Grade

37 Qs

Quiz on Flow of Control in Python

Quiz on Flow of Control in Python

Assessment

Quiz

Computers

12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?