1. Home
  2. Data Science
  3. Python
  4. Which of the following statements is used for importing a…

Added 25 Jan 2024

Which of the following statements is used for importing a module in Python?

  1. import Correct answer
  2. include
  3. require
  4. from

Correct answer

A. import

14 views

MCQSEXAM

Explanation

The import statement loads a module in Python, e.g. import math. The form from math import sqrt also relies on import; the word from cannot be used alone.

include and require belong to other languages such as PHP, C and Node.js.

Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs