Python Summer Internship Quiz-8

Python Summer Internship Quiz-8

Professional Development

10 Qs

quiz-placeholder

Similar activities

Routh criterion 2

Routh criterion 2

Professional Development

5 Qs

Selection Statements_python

Selection Statements_python

Professional Development

10 Qs

Python Test 3A

Python Test 3A

Professional Development

10 Qs

Simple Python Quiz

Simple Python Quiz

Professional Development

15 Qs

C Operators

C Operators

University - Professional Development

15 Qs

Python Test-2A

Python Test-2A

Professional Development

11 Qs

Quiz - 2

Quiz - 2

Professional Development

9 Qs

Funciones

Funciones

Professional Development

12 Qs

Python Summer Internship Quiz-8

Python Summer Internship Quiz-8

Assessment

Quiz

Professional Development

Professional Development

Medium

Created by

Gnaneshwar Reddy

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a looping statement in Python?

  • A) for

  • B) while

  • C) loop

  • D) do-while

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the following for loop iterate?

for i in range(5):

print(i)

  • A) 5 times

  • B) 4 times

  • C) Infinite times

  • D) 0 times

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

i = 1

while i < 5:

print(i)

i += 2

  • A) 1 2 3 4

  • B) 1 3

  • C) 1 2 4

  • D) 1 3 5 7

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used to terminate the current loop iteration and move to the next iteration in Python?

  • A) break

  • B) continue

  • C) pass

  • D) exit

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

for i in range(3):

for j in range(2):

print(i, j)

  • A) 0 0 1 0 2 0

  • B) 0 1 1 2 2 3

  • C) 0 0 0 1 1 0 1 1 2 0 2 1

  • D) 0 0 0 1 1 0 1 1 2 0 2 1

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the range(5) function represent in Python?

  • A) A list containing numbers from 0 to 4

  • B) A list containing numbers from 1 to 5

  • C) A generator function

  • D) An infinite loop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about the while loop in Python?

  • A) It executes a block of code a specified number of times.

  • B) It continues to execute a block of code as long as a condition is true.

  • C) It is used only for iterating through sequences.

  • D) It cannot be terminated manually.

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?

Discover more resources for Professional Development