Python Quiz - 25/09/2024

Python Quiz - 25/09/2024

University

15 Qs

quiz-placeholder

Similar activities

Exception handling -oracle plsql

Exception handling -oracle plsql

University

15 Qs

Control Statements - Java

Control Statements - Java

University

15 Qs

Java Control Flow statements

Java Control Flow statements

University

10 Qs

P1_APLab2Quiz_B3B4

P1_APLab2Quiz_B3B4

University

10 Qs

Code Junction 4

Code Junction 4

University

20 Qs

Day 4 Quiz

Day 4 Quiz

University

10 Qs

PL SQL

PL SQL

University - Professional Development

20 Qs

Java Programming

Java Programming

University

20 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?