Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS1_L4 mcq

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the main purpose of a variable in Python? p1

a)

To repeat code

b)

To store information for later use

c)

To stop a program

d)

To print output

2.

In the statement coins = 3, what is the value being stored? p1

a)

coins

b)

=

c)

integer

d)

3

3.

What symbol is used as the assignment operator in Python? p1

a)

==

b)

::

c)

=

d)

→

4.

Which data type represents decimal numbers? p1

a)

Integer

b)

Boolean

c)

String

d)

Float

5.

Which of the following is a Boolean value? p5

a)

A. "True"

b)

B. True

c)

C. 3.5

d)

D. "False"

6.

What happens during reassignment of a variable? p7

a)

The variable is deleted

b)

All previous values are saved

c)

The most recent value replaces the old one

d)

The variable name changes

7.

What does it mean to reference a variable? p8

a)

Printing the variable

b)

Creating a new variable

c)

Using the variable name to access its value

d)

Assigning a new value

8.

What does a method do when it returns a value? p9

a)

Ends the program

b)

Gives back information

c)

Deletes a variable

d)

Prints output

9.

In the statement enemy = hero.findNearestEnemy(), what is stored in enemy? p9

a)

The hero

b)

A Boolean value

c)

A string

d)

The closest enemy

10.

Which term describes changing the value stored in a variable? p7

a)

Reference

b)

Assign

c)

Return

d)

Reassignment