wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following represents a distinctly identifiable entity in the real world?

a)

A class

b)

An Object

c)

A method

d)

A data field

2.

Which of the following represents a template, blueprint, or contract that defines objects of the same type?

a)

A class

b)

An object

c)

A method

d)

A data field

3.

Which of the following is an invalid statement?

a)

abc = 1,000,000

b)

a b c = 1000 2000 3000

c)

a,b,c = 1000, 2000, 3000

d)

a_b_c = 1,000,000

4.

Which of the following statements is most accurate for the declaration x = Circle()?

a)

x contains an int value.

b)

x contains an object of the Circle type.

c)

x contains a reference to a Circle object.

d)

You can assign an int value to x.

5.

What is the maximum possible length of an identifier?

a)

32 characters

b)

64 characters

c)

128 characters

d)

None of the above

6.

Which statement is correct....?

a)

List is mutable && Tuple is immutable

b)

List is immutable && Tuple is mutable

c)

Both immutable

d)

Both mutable

7.

What is the output of the given python code?

a)

<class 'int'>

b)

<class 'complex'>

c)

<class 'float'>

d)

<class 'None'>

8.

Find the Output


>>> print(chr(ord('b')+1))

a)

a+b

b)

b+1

c)

c

d)

99

9.

Find the Output


s = "\t\tWelcome\n"

print(s.strip())

a)

\t\tWelcome\n

b)

\t\tWelcome

c)

Welcome

d)

None

10.

The format function, when applied on a string returns

a)

list

b)

bool

c)

int

d)

str