Which out of the following is incorrect syntax for importing a module of Python?

2026

Which out of the following is incorrect syntax for importing a module of Python?

  1. A.

    import math

  2. B.

    from math import sin, cos

  3. C.

    from sin, cos import math

  4. D.

    import math as mt

Attempted by 164 students.

Show answer & explanation

Correct answer: C

Python import syntax requires the module name after 'from' and specific items after 'import'. The option 'from sin, cos import math' is invalid because it reverses this order. Correct syntax is 'from math import sin, cos'. Other options follow standard Python conventions.

Explore the full course: Rssb Senior Computer Instructor