Which of the following statements correctly imports the math module in Python?

2026

Which of the following statements correctly imports the math module in Python?

  1. A.

    include math

  2. B.

    import math

  3. C.

    using math

  4. D.

    #import math

Attempted by 266 students.

Show answer & explanation

Correct answer: B

To import a module in Python, you use the `import` keyword followed by the module name. For example, to access mathematical functions, you write `import math`. Other keywords like `using`, `include`, or symbols like `#` do not perform module imports in Python.

Explore the full course: Rssb Senior Computer Instructor