WorksheetsVariables and Data Types - Understanding Checkpoint
Total questions: 5
Worksheet time: 5mins
Name
Class
Date
1.
What is a variable in programming?
a)
A fixed value that cannot be changed
b)
Something that stores information in a program for later use
c)
A command that executes a specific action
d)
A visual element displayed on the screen
2.
What type is the following variable?
x = "Hi there"
a)
float
b)
integer
c)
boolean
d)
string
3.
What does the following Python program print?
x = "I am"
y = 6
z = "feet tall"
print(x)
print(y)
print(z)
a)
I am 6 feet tall
b)
I am6feet tall
c)
I am
6
feet tall
d)
x
y
z
4.
Choose the correct declaration of a float variable with the value 3.14.
a)
pi = “3.14”
b)
pi = int(3.14)
c)
pi = 3.14
d)
float pi = 3.14
5.
Which built-in Python function can be used to determine the data type of a variable?
a)
print()
b)
value()
c)
name()
d)
type()
100 %
