Library, modules and the math module
Answers are for parents and teachers.
1
Write a program that prints a random whole number from 10 to 20 (20 included) using the random module.
import random ⏎ print(random.randint(10, 20))
2
Find the area of a circle of radius 3 with round(math.pi * r ** 2, 2).
28.27
3
What is math.factorial(6) equal to?
720
4
Why may sin 30° printed without round() show 0.49999… and not 0.5?
Real numbers are stored approximately in memory, so a very small error appears.