wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

introduction to python

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

Num = 90

Num = 20

print(Num)

a)

90

b)

4.5

c)

20

d)

1800

2.

Which statement prints I am 10 years old?

a)

pint("I am 10 years old.")

b)

print('I am 10 years old.)

c)

print('')I am 10 years old.

d)

print("I am 10 years old.")

3.

Which statement prints 7 (Select 2 answers)

a)

print 7

b)

print("7"

c)

print("7")

d)

print(3 + 4)

4.
What is the purpose of the 'input()' function in programming?
a)
Assign a value to a variable
b)
Perform arithmetic calculations
c)
Print output to the screen
d)
Receive input from the user
5.
Which built-in function is used to write output to the screen?
a)
input()
b)
read()
c)
write()
d)
print()
6.
In the statement 'x = 5', what is '5'?
a)
A value
b)
A function
c)
A loop
d)
A variable
7.

What is the input for the following code?

Python

is

easy

a)

Print( Python is easy)

b)

print(" Python ")

print("is")

print("easy")

c)

print( Python is easy)

8.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language
9.

A named memory location used to store values in computer is a ...

a)

Casting

b)

String

c)

Variable

d)

Hard Drive Disk

10.

Choose variable rules from the list below: (Select 3 answers)

a)

Must not begin with a number

b)

Can only contain (A-Z, a-z) and 0-9 characters, and _

c)

Can use _ to join words separated words

d)

Must be in lower case