If-Else Loops: Python Programming

If-Else Loops: Python Programming

11th Grade

16 Qs

quiz-placeholder

Similar activities

Skill Competition Quiz 2024

Skill Competition Quiz 2024

10th Grade - University

20 Qs

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

Common Protocols

Common Protocols

10th - 12th Grade

15 Qs

CSS - Operating System

CSS - Operating System

11th Grade

20 Qs

Animated Canvas

Animated Canvas

9th - 12th Grade

19 Qs

Coding Karel 2

Coding Karel 2

KG - University

20 Qs

Computer Hardware - CPU & GPU

Computer Hardware - CPU & GPU

7th Grade - University

16 Qs

If-Else Loops: Python Programming

If-Else Loops: Python Programming

Assessment

Quiz

Computers

11th Grade

Practice Problem

Hard

Created by

Piyush Bhagat

Used 101+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following loop:-

for l in 'Jhon':

if l == 'o':

pass

print(l, end=", ")

J, h, n,

J, h, o, n,

Error

None of the given Options

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following range() function?


for num in range(2,-5,-1):

print(num, end=", ")

2, 1, 0

2, 1, 0, -1, -2, -3, -4, -5

2, 1, 0, -1, -2, -3, -4

0

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Given the nested if-else below, what will be the value x when the code is executed successfully.

0

4

2

3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Given the nested if-else structure below, what will be the value of x after code execution completes.

2

0

3

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following nested loop?

10 Chair

10 Table

20 Chair

20 Table

10 Chair

10 Table

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the value of x?

101

None of the given options, this is an infinite loop

99

100

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following if statement?

False

True

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?