Мой профиль
ACTIVITY 49 / 50

A module alias

Try as many times as you need

Let’s understand

An import can give a module a short name: import math as m. The as keyword creates an alias; its functions stay the same. You now call the square root as m.sqrt. Choose clear names and use the chosen name consistently. An alias neither installs a package nor changes the module.

Listen to the explanation

Example

import math as numbers
print(numbers.floor(4.8))
YOUR MISSION

Import math as m. Read a non-negative number with float(input()) and print m.sqrt of it.

I need a hint

Start with import math as m, then call the function with a dot.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.