PYTHON Output Statement MCQ
Python MCQ- Home
- Tutorials
- Python
- Output Statement
- Multiple Choice Question
(1) In python which of the following operator is used as string concatenation withon print() function.
A) + (Plus)
B) . (Dot)
C) & (ampersand)
D) _ (Underscore)
Explanation
Plus symbol is used to concatenate two or more strings within print() function.
(2) In python programming which keyword is used for changing default output separator?
A) separator
B) sep
C) divider
D) link
Explanation
sep keyword is used for changing default separator of print() function. The default separator is space in python print() function.
(3) How many variables and strings can be provided as parameter input in python print() function?
A) One String , Multiple variables
B) One String, One Variable
C) Multiple Strings, One Variable
D) Multiple Strings, Multiple variables
Explanation
By using print() function we can display multiple strings and multiple variables at the same time separated by comma.
(4) In python which of the following keyword is used for changing default statement terminator?
A) Terminator
B) Last
C) End
D) Close
Explanation
\n carriage return is the default parameter of print() statement in python script. We can change it by using end keyword.
(5) How many parameters are optional in python print() function?
A) One
B) Two
C) None
D) All
Explanation
All the parameters of print() function in python language are optional. We can also use print() function without using any parameter, such like print().
(6) How many paramters are used in python printf syntax?
A) One
B) Three
C) Five
D) Seven
Explanation
There are five parameters that can take print() statement in python.
(7) In python which of the following function is used to display output on screnn?
A) display()
B) print()
C) show()
D) printf()
Explanation
print() function is the default output function in python language.