Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Using import math in Python

Total questions: 6

Worksheet time: 3mins

Name
Class
Date
1.

What does import math do in Python?

a)

Draw shapes

b)

Draw shapes

c)

Brings in extra math functions.

d)

Makes your code run faster

2.

Which function gives you the value of π (pi)?

a)

pi()

b)

math.pi()

c)

math.PI()

d)

get.pi()

3.

What is the formula to calculate the area of a circle?

a)

π × r²

b)

2 × π × r

c)

π × 2 × r

d)

r² + π

4.

How do you calculate the square root of 25 using Python?

a)

math.square(25)

b)

math.sqrt(25)

c)

sqrt(25)

d)

math.pow(25, 2)

5.

Which of the following finds the area of a circle with radius 5?

a)

5 * 3.14

b)

math.pi *5**2

c)

math.sqrt(5)

d)

math.pow(5, 2)

6.

Which of the following imports both math and random libraries?

a)

import math.random

b)

from math import random

c)

import math, random

d)

random.import(math)