If-Else Loops: Python Programming

If-Else Loops: Python Programming

11th Grade

16 Qs

quiz-placeholder

Similar activities

SELECTION STATEMENTS(PASCAL)

SELECTION STATEMENTS(PASCAL)

11th Grade

12 Qs

Subroutines

Subroutines

9th - 11th Grade

16 Qs

Edublocks nested if

Edublocks nested if

6th - 12th Grade

18 Qs

GCSE Computer Science - Python Programming Concepts

GCSE Computer Science - Python Programming Concepts

9th - 11th Grade

17 Qs

CodeHS Unit 1

CodeHS Unit 1

9th - 12th Grade

12 Qs

Python For And While Loop

Python For And While Loop

8th - 12th Grade

20 Qs

Arduino Loop

Arduino Loop

2nd Grade - University

20 Qs

Control Statements in Python

Control Statements in Python

11th Grade

20 Qs

If-Else Loops: Python Programming

If-Else Loops: Python Programming

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Piyush Bhagat

Used 79+ times

FREE Resource

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

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?