How to use the function


in console it says as below
File "python", line 3
from module import.sqrt
SyntaxError: invalid syntax

and error says
Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 3)

# Import *just* the sqrt function from math on line 3!

from module import.sqrt


If you remember, there are many different modules that contain functions. Currently you are trying to import a function from module, module doesn't exist, it's just a name for the various modules that do exist. If you look closely at the instructions it will tell you which module you want.

Also there should be a space, not a period, between import and sqrt.


Can you say the types of module and the functions.

I can;t understand.. im not getting output even i use the code below`
from module import sqrt



There are hundreds of different modules available. The documentation for python has a list, you can find it here

In this case you need to import the sqrt function from the math module.


Thanks a lot.. i didnt first understand syntax .. got output bro =D


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.