wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz 1 Internship

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Python is named after

a)

Monty Bonty

b)

Monty Python

c)

Richard Python

d)

Guido Van Russum

2.

Python uses

a)

compiler

b)

Interpreter

c)

Both

d)

None

3.

Which of the following are not data types

a)

Float

b)

LIST

c)

String

d)

Boolean

4.

x="BNMIT"

print(x[2::-1])

a)

TIM

b)

MIT

c)

MNB

d)

BNM

5.

What do we use to define a block of code in Python language?

a)

Key

b)

Bracket

c)

Indentation

d)

All

6.

Which of the following operators is the correct option for power(ab)?

a)

a^b

b)

a*b

c)

a**b

d)

a*^b

7.

Study the following code:

x = ['XX', 'YY']

for i in a:

i.lower()

print(a)

What will be the output of this program?

a)

['XX', 'YY']

b)

['xx', 'yy']

c)

[XX, yy]

d)

None

8.

Study the following function:

import math

abs(math.sqrt(36))

What will be the output of this code?

a)

Error

b)

-6

c)

6

d)

6.0

9.

Study the following function:

any([5>8, 6>3, 3>1])

What will be the output of this code?

a)

False

b)

Invalid

c)

True

d)

None

10.

What will be the datatype of the var in the below code snippet?

var = 10 print(type(var))

var = "Hello"

print(type(var))

a)

str and int

b)

int and int

c)

int and str

d)

str and str

11.

What will be the output of the following code snippet?

a = [1, 2, 3]

a = tuple(a)

a[0] = 2 print(a)

a)

[2,2,3]

b)

error

c)

(2,2,3)

d)

{1,2,3}

12.

What will be the output of the following code snippet?

def func():

global value

value = "Local"

value = "Global"

func()

print(value)

a)

Local

b)

Global

c)

Local-Global

d)

value

13.

What will be the output of the following code snippet?

example = ["Sunday", "Monday", "Tuesday", "Wednesday"];

print(example[-3:-1])

a)

['Monday','Tuesday']

b)

['Wednesday','Tuesday']

c)

['Sunday','Tuesday']

d)

['Monday','Sunday']

14.

What will be the output of the following code snippet?

a = [1, 2]

print(a * 3)

a)

ALL

b)

[1,2]

c)

[1,2,1,2,1,2]

d)

[1,2,1,2]

15.

Are Nested If loops allowed in functions?

a)

Yes

b)

No

c)

Probably No

d)

May be