Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Introduction to Python, variables and data types

Total questions: 8

Worksheet time: 5mins

Name
Class
Date
1.
Which of the following statement is correct?
a)
Python is a high level programming language
b)
Python is an low level programming language
c)
Python is an machine code language
d)
All of the above
2.
Which data type represents a whole number?
a)
integer
b)
string
c)
float
d)
Boolean
3.
What data type is a in this code : a = "5"
a)
integer
b)
float
c)
boolean
d)
string
4.
What command do we use to tell Python to accept an input?
a)
cin
b)
input()
c)
scanf()
d)
<>
5.
What does the statement 'print' do?
a)
Output a hard copy of a program to a printer
b)
Output a message on the screen
c)
Print a hard copy of a flowchart to a computer
6.
What is a variable?
a)
A number
b)
A message input by the user
c)
A location in memory that we use to store data
7.
Which of the following is correct?
a)
The Python interpreter ignores comments
b)
Comments are used by programmers for a better understanding of the program
c)
You use the # symbol before a comment
d)
All of the above
8.
A programmer types flt(price), what type of data are they assigning to the price?
a)
Boolean
b)
Float
c)
String
d)
Integer