WorksheetsIntro to Python recap
Total questions: 11
Worksheet time: 6mins
Name
Class
Date
1.
What is a variable?
a)
A math operator
b)
An element, feature, or factor that is liable to vary or change.
c)
An if statement
d)
A computer system that can change
2.
What does print("hello) display?
a)
hello
b)
gives you an error
c)
"hello"
d)
"hello
3.
What does the following code display?
a = 1
b = 2
print(a + a)
a)
2
b)
3
c)
4
d)
22
4.
How do you ask an input from a user?
a)
name = int("what is your name")
b)
name = input(what is your name?)
c)
input = name("what is your name?")
d)
name = input("what is your name?")
5.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
6.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus +
c)
forward slash /
d)
asterisk *
7.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")
8.
Variables may hold...
a)
Strings
b)
Integers
c)
Floats
d)
Booleans
e)
All of the above
9.
"These are words!" is a ...
a)
Integers
b)
Floats
c)
Booleans
d)
String
10.
3.14159 is ... (pick two)
a)
Pi
b)
A float
c)
An integer
d)
A string
11.
1205 is a ...
a)
Boolean
b)
Float
c)
Integer
d)
String
100 %
