Multiple choice

How would you call the sqrt function from the math module using a generic import?

  1. sqrt(16)

  2. module.sqrt(16)

  3. call.sqrt(16)

  4. math.sqrt(16)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When importing a module using 'import math', you access its functions by prefixing the function name with the module name followed by a dot, as in 'math.sqrt(16)'.