What is the output of the following code? [code]p=input(''); po[/code]

What is the output of the following code?
Code:
p=input('');
po
A. ‘po’ gets assigned to p
B. Error in the input
C. Error due to syntax
D. Cannot be determined
 
Answer: b
Explanation: The given input, po, results in an error. If after the input() command, we want to give a text input, we need to include the input within ‘’. Since we’ve not given po within ‘’, it results in an error.
 

Tìm kiếm

Back
Top