wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Nirmala School quiz

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

Which symbol is used to indicate a single-line comment in Python?

a)

//

b)

#

c)

/*

d)

%

2.

What does the "if" block in Scratch help you achieve?

a)

Repeating actions

b)

Making decisions

c)

Storing values

d)

Playing sounds

3.

How would you access the third element in a list named my_list?

a)

my_list[0]

b)

my_list[1]

c)

my_list[2]

d)

my_list[3]

4.

What is the purpose of the "repeat" block in Scratch?

a)

To change the background color

b)

To repeat a sequence of action

c)

To play a sound

d)

To draw a shape

5.

What is the result of 3 ** 2 in Python?

a)

9

b)

8

c)

10

d)

7

6.

In a bag: 6 red, 4 blue, 5 green balls. Probability of picking green?

a)

0.7

b)

0.5

c)

0.9

d)

0.3

7.

If a = 4 and b = 7, what's the value of 3a - 2b?

a)

-5

b)

-2

c)

5

d)

14

8.

If the sum of two angles is 90 degrees and one angle is 40 degrees, what is the measure of the other angle?

a)

40 degrees

b)

50 degrees

c)

60 degrees

d)

70 degrees

9.

In python how do you check if two variables, x and y, are equal in Python?

a)

x=y

b)

x==y

c)

x!=y

d)

x/y

10.

How do you create a variable in Python?

a)

new variable = 5

b)

5 = new variable

c)

variable = 5

d)

int variable = 5

11.

Which data type is used to store a single character in Python?

a)

char

b)

character

c)

chr

d)

string

12.

What is the output of print(len("Python"))?

a)

5

b)

6

c)

7

d)

"Python"