Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1math.sqrt(49) | AThe math. prefix is missing. After import math, the function must be called as math.sqrt(25). | |
| 2math.ceil(4.2) | Barea = math.pi * r ** 2 | |
| 3Import the math module first so its functions and constants can be used | Cimport math | |
| 4Use the math module's built-in constant for pi to find the area of a circle | Dmath.floor() rounds down, so it gives 7, not 8. Use math.ceil() to round up to 8. | |
| 5sqrt(25) | ERounds 4.2 up to the next whole number, 5 | |
| 6print(math.floor(7.9)) # expects 8 | FReturns the square root of 49, which is 7.0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
import math — Loads Python's math module, giving you extras like math.sqrt(), math.pi, math.ceil() and math.floor() that basic operators don't have. Call them with the math. prefix.import math
print(math.sqrt(49))import math
root = math.sqrt(64)
print(root)import math
area = math.pi * 5 ** 2
print(area)import math
pages = math.ceil(23 / 10)
print(pages)import math
whole = math.floor(7.9)
print(whole)