← Python from Scratch
Lesson 50 of 78 · 5 XP
Warm-up: square root warm-up
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
A module is a ready-made set of functions. To use it, write import. The math module has a square root, sqrt:
import math
print(math.sqrt(9)) # 3.0
You reach it through a dot: math.sqrt. The answer is a decimal number, so it prints 3.0.
Task. Read an integer and print its square root.
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.