NEW
Font size
S
M
L
XL
Worksheetsvariable
Total questions: 11
Worksheet time: 4mins
Name
Class
Date
1.
What do we use variables for?
a)
for storing data.
b)
for printing commands.
c)
for comment
2.
what will be the answer of this question
Num = 90
Num = 20
print(Num)
a)
110
b)
100
c)
20
d)
80
3.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
4.
In the following code, what type of variable is being created?
foo = 3.5
a)
Integer
b)
Float
c)
String
5.
which one of these variable is wrong?
a)
_what = 'hello world'
b)
1what = 'hello world'
c)
what = 'hello world'
6.
what is a variable?
a)
a box(container) in which we store values and information.
b)
something we use to print a block of code
c)
a comment
d)
an error
7.
x = 5
y = 6
print(x*y)
what will be the answer of the following
a)
11
b)
30
c)
1
d)
0
8.
a = 30
b = 20
print(a-b)
a)
20
b)
10
c)
50
d)
90
9.
is variable useful in python
a)
YES
b)
NO
10.
r = 80
d = 10
print(r/d)
a)
10
b)
800
c)
8
d)
0
11.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
indentation
d)
Incorrect spelling
Reset
