wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CBSE Class 12 Computer Science Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What error occurs when you execute the following Python code snippet? apple = mango

a)

NameError

b)

TypeError

c)

SyntaxError

d)

ValueError

2.

Which of the following can be used as valid variable identifier(s) in Python?

a)

Que$tion

b)

Salute

c)

global

d)

total

3.

Which of the following forces an expression to be converted into a specific type?

a)

Immutable type casting

b)

Implicit type casting

c)

Mutable type casting

d)

Explicit type casting

4.

If l=[11,22,33,44], then the output of print(len(l)) will be

a)

4

b)

3

c)

6

d)

8

5.

In Python function, the function calling another function is known as ___________ and the function being called is known as ____________

a)

caller, called

b)

main, keyword

c)

executer, execute

d)

called, caller

6.

pow( ) function belongs to which library?

a)

maths

b)

random

c)

string

d)

math

7.

Identify the module to which the following function load() belongs to?

a)

math

b)

random

c)

pickle

d)

sys

8.

Which of the following is a valid function name?

a)

All of the above

b)

start-game()

c)

start game()

d)

Start_game()

9.

The variable declared inside the function is called a variable

a)

local

b)

external

c)

global

d)

none of the above

10.

To read the entire remaining contents of the file as a string from a file object myfile, we use

a)

myfile.readlines()

b)

myfile.readline()

c)

myfile.read(2)

d)

myfile.read()