Single Choice
Not Set
QUser input is read as ________ ?
ID: #3395
Python Basic MCQ
806 views
Question Info
#3395Q ID
Not SetDifficulty
Python Basic MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
In Python, the input() function reads user input as a
text string (str) by default, regardless of
whether the user enters letters, numbers, or symbols.
Example:
color = input("What color is rose?: ")
print("Rose is", color)
Output:
What color is rose?: red
Rose is red
Even if the user enters a number, it is stored as a string.
Example:
age = input("Enter your age: ")
print(type(age))
Output:
Enter your age: 25
To perform numerical operations, the input must be converted using functions
such as int() or float().
Therefore, the correct answer is Option B) Text String.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic