Function Imports


Why doesn't the code below work?

from module import sqrt 25


Hi @arcace20829,

You cannot import an argument in that fashion that you plan to pass to a function.

First import the function ...

from math import sqrt

... then call the function, passing it 25 as an argument ...

print sqrt(25)


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