Console Input/Output Questions and Answers
Python Programming - Console Input/Output Questions with Answers teach how to take user input and display output efficiently. These Python Input Output Questions are often asked in SSC, RRB, TCS, and Accenture exams for programming fundamentals
Console Input/Output
Showing 10 of
25 questions
1. Which function is used to read input from the console in Python?
- scanf()
- read()
- input()
- get()
2. What does the print() function return in Python?
- The printed string
- 0
- None
- True
3. How can you display multiple values in a single print statement?
- Using + operator
- Using commas
- Using & operator
- Using concat()
4. What is the default data type of input received from input() function?
- Integer
- Float
- String
- Boolean
5. Which parameter in print() function prevents newline at the end?
- newline
- sep
- end
- break
6. How to convert string input to integer in Python?
- str_to_int()
- integer()
- int()
- convert_int()
7. What is the output of: print("Hello", "World", sep="-")?
- Hello World
- Hello-World
- Hello,World
- Hello - World
8. Which function is used for formatted output in Python?
- printf()
- format()
- formatted()
- output()
9. What happens if you press Enter without typing anything in input()?
- Returns None
- Returns 0
- Returns empty string
- Raises an error
10. How to display a variable value with descriptive text?
- Using concatenation with +
- Using multiple print statements
- Using f-strings
- All of the above