What is the correct way to import a module named "math" in Python?
Correct answer
A. import math
17 views
A. import math
17 views
import math loads Python's built-in math module, after which its contents are used with dot notation, e.g. math.sqrt(16) or math.pi.
You can also write from math import sqrt or give an alias with import math as m. include, require and use are keywords of other languages.
For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.