1. Home
  2. Data Science
  3. Python
  4. What is the purpose of the 'input' function?

Added 5 Feb 2024

What is the purpose of the 'input' function?

  1. Display information on the console
  2. Take user input from the console Correct answer
  3. Perform complex calculations
  4. Print the program output

Correct answer

B. Take user input from the console

17 views

MCQSEXAM

Explanation

The 'input' function is used to take user input from the console, allowing for dynamic interaction with the program during runtime.

Reference

https://www.w3schools.com/python/default.asp

Doubts & discussion

Not sure why the answer is B? 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