wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Tutorial 5 Quiz

Total questions: 14

Worksheet time: 6mins

Name
Class
Date
1.

What is the output for print(foo(10))?

a)

'A'

b)

'B'

c)

'C'

d)

Error!

e)

None of the answers are correct

2.

What is the output of print(foo(2))?

a)

"AAA"

b)

"ACA"

c)

"AAB"

d)

Error!

e)

None of the answers is correct

3.

What is the output of print(foo())?

a)

"CS1010E"

b)

"CS10"

c)

"CS1"

d)

Error!

e)

None of the answers is correct

4.

What is printed for foo_print(x)?

a)

"HEY"

b)

"HI"

c)

"HELLO"

d)

Nothing

e)

Error!

5.

What is printed for foo_print(x)?

a)

"HI"

b)

"HELLO"

c)

Nothing

d)

Error!

6.

What is the output of hugs(5)?

a)

"oxo"

b)

"oxoxoxo"

c)

"oxoxo"

d)

"oxoxoxoxo"

e)

Error!

7.

What is the output of print(memorize("ABCD")?

a)

"AABACADA"

b)

"AABABCABCD"

c)

"ABACBADCBA"

d)

"ABACAD"

e)

Huh?

8.

What is the output of foo(20)?

a)

38

b)

18

c)

17

d)

Error!

e)

None of the answer is correct

9.

What is the output of this code?

a)

(1, [1, 2, 3], 3, 4)

b)

[1, 2, 3, 4]

c)

[1, [1, 2, 3], 3, 4]

d)

Error!

e)

[1, [2, 2, 3], 3, 4]

10.

What is the output of this code?

a)

(1, [1, 2, 3], 3, 4)

b)

[1, 2, 3, 4]

c)

[1, [1, 2, 3], 3, 4]

d)

Error!

e)

[1, [2, 2, 3], 3, 4]

11.

What is the output of this code?

a)

(1, [1, 2, 3], 3, 4)

b)

[1, 2, 3, 4]

c)

[1, [1, 2, 3], 3, 4]

d)

Error!

e)

[1, [2, 2, 3], 3, 4]

12.

What is the output of this code?

a)

(1, [1, 2, 3], 3, 4)

b)

[1, 2, 3, 4]

c)

[1, [1, 2, 3], 3, 4]

d)

Error!

e)

[1, [2, 2, 3], 3, 4]

13.

What is the output of this code?

a)

(1, [1, 2, 3], 3, 4)

b)

[1, 2, 3, 4]

c)

[1, [1, 2, 3], 3, 4]

d)

Error!

e)

[1, [2, 2, 3], 3, 4]

14.

What is the output of print(foo(lst))?

a)

True

b)

False