wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Learn Python 2 Python Syntax

Total questions: 12

Worksheet time: 7mins

Name
Class
Date
1.

What function is used to output a message in python?

a)

print("")

b)

input=name

c)

print

d)

name=input

2.

In Python 2 and 3 you print the exact same way

a)

True

b)

False

3.

What symbol is used to join strings together?

a)

%

b)

+

c)

*

4.

If I wanted to make a variable set to my age (34), which would be correct?

a)

my_age = 34

b)

my age = 34

5.

If you do not want a remainder printed what symbol do you use?

a)

%

b)

#

c)

*

6.

What sign do you use to add a variable

a)

+=

b)

%

7.

What is the correct symbol to use for a comment?

a)

@

b)

#

8.

In order to print out the remainder of a division problem use what method?

a)

remainder

b)

division

c)

float

9.

What symbol is used if you are printing out multiple lines of string?

a)

%

b)

+

c)

""""

10.

What function do you use to to make all letters turn uppercase?

a)

len()

b)

float()

c)

.upper()

d)

.lower()

11.

What function do you use to to make all letters turn lowercase?

a)

len()

b)

float()

c)

.upper()

d)

.lower()

12.

What function do you use to to find the length of the string?

a)

len()

b)

float()

c)

.upper()

d)

.lower()