Exercise Set 6

Exercise 1 of 6

Write a line of code to import the random library.

Your code

Exercise 2 of 6

Write a line of code to import the math library.

Your code

Exercise 3 of 6

Fix the error by entering the missing line.
random_num = random.randint(1, 10)
print(f"Your random number is {random_num}")

Your code

Exercise 4 of 6

Fix the error by entering the missing line.
radius = 3
area = math.pi * math.pow(radius, 2)
print(f"The area is {area}")

Your code

Exercise 5 of 6

Fix the error by entering the missing line.
import math
radius = random.randint(5, 10)
area = math.pi * math.pow(radius, 2)
print(f"The area is {area}")

Your code

Exercise 6 of 6

Write code to print a random number between 50 and 100.

Your code