Python Quiz - 25/09/2024

Python Quiz - 25/09/2024

University

15 Qs

quiz-placeholder

Similar activities

Bootcamp Day 3 - Java Array

Bootcamp Day 3 - Java Array

University

15 Qs

Java Quiz 3

Java Quiz 3

University

15 Qs

CHAPTER 4 - PART 1

CHAPTER 4 - PART 1

University

15 Qs

Coding CHASE

Coding CHASE

10th Grade - University

15 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

Java Control and Loop -2

Java Control and Loop -2

University

20 Qs

Kuizi 14 - Web

Kuizi 14 - Web

10th Grade - University

15 Qs

Debugging-Duel-CodeUp'25

Debugging-Duel-CodeUp'25

University

10 Qs

Python Quiz - 25/09/2024

Python Quiz - 25/09/2024

Assessment

Quiz

Computers

University

Hard

Created by

Aayush Tiwari

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will the following code output?

B

A

C

no output

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statements is TRUE about the elif keyword?

It is used to replace multiple if statements.

It must always be followed by an else statement.

It allows checking multiple conditions sequentially.

It terminates the program if the condition is true.

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of the following code?

X is greater

Y is greater

No output

Syntax error

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of the following code?

0 1 2

1 2 3

infinite loop

3 2 1

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which loop will execute at least once, regardless of the condition?

For loop

While loop

Do-while loop

Nested loop

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of the following code?

0 1 2

0 1 2 3 4

1 2 3

No output

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statements is TRUE about loops in Python?

  • The "break" statement skips to the next iteration of the loop.

The "continue" statement exits the loop completely

A "while" loop can be used without a condition

  • The "else" part of a loop is executed only when the loop terminates normally, without a "break".

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?