WorksheetsLesson 2 - Math in Python
Total questions: 10
Worksheet time: 8mins
Name
Class
Date
1.
Which answer is the correct output?
print(5.0 * 5)
a)
25
b)
10
c)
10.0
d)
25.0
2.
Which operator is used in this line of code?
print(20 // 3)
a)
modulus
b)
floor division
c)
exponentiation
3.
What are the 3 new operators we learned today?
a)
floor division
b)
addition
c)
modulus
d)
exponentiation
e)
subtraction
4.
The (a) function is used to identify a datatype.
5.
What is it called when you convert a variable from one datatype to another?
(a)
6.
Cast the variable height to a float.
height = 6
*Remember to put it inside of a print statement*
(a)
7.
What will be the output?
print(25 - 4 + 9)
(a)
8.
What will be the output?
print(2 ** 3)
a)
6
b)
8
c)
-1
d)
5
9.
What will be the output?
students = 30
students = 14
print(students)
(a)
10.
What will be the output?
print(int(3.98))
a)
3.98
b)
Error
c)
3
d)
4
100 %
