wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PCEP Lesson 1 Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following is NOT a data type?

a)

Boolean

b)

Word

c)

Integer

d)

List

2.

Which is the correct way to declare 3 variables, 'a' , 'b', 'c' to 1?

a)

a = b = c = 1

b)

a,b,c = 1

c)

a == b

b == c

c == 1

d)

abc = 1

3.

name = "Magikid Lab"

What will the following code print?

print(name[7])

a)

'k'

b)

' '

c)

'7'

d)

'L'

4.

name = "Magikid Lab"

What snippet of code will print only "Lab"?

a)

print(name[5])

b)

print(name[5:]

c)

print(name[8:])

d)

print(name[Lab])

5.

Which of the following brackets are used for list?

a)

{ }

b)

[ ]

c)

( )

d)

| |

6.

What is the key difference between list and tuples?

a)

List only contain integers and tuples contain strings

b)

List are able to change elements and size where tuples are not.

c)

List hold more values than Tuples

d)

List can only contain strings and Tuples can only contain integers

7.

Which of the following is true about Dictionaries?

a)

Consist of key-value pairs

b)

enclosed with [ ]

c)

Only consist of integers

d)

Only Consist of Strings

8.

Choose the correct answer

a)

print(s1[1:3])

b)

print(s1[1:-3])

c)

print(s1[2])

d)

print(s1[-3])

9.

Which of the following brackets are used for dictionaries?

a)

[ ]

b)

{ }

c)

( )

d)

| |

10.

What is something you wish to learn more about or practice on?

a)

Declaration of different data types

b)

Use of built in functions

c)

Tuples and Dictionaries

d)

Exercises given in class/homework