What will be the output of the following Python statement?
a) Error
b) Output equivalent to print ‘new\nline’
c) newline
d) new line
Explanation: String literal separated by whitespace are allowed. They are concatenated.
What will be the output of the following Python code?
a) dlrowolleh
b) hello
c) world
d) helloworld
Explanation: Execute in shell to verify.
What will be the output of the following Python code?
a) 0xA0xB0xC
b) Error
c) 0x22
d) 33
Explanation: 0xA and 0xB and 0xC are hexadecimal integer literals representing the decimal values 10, 11 and 12 respectively. There sum is 33.
What will be the output of the following Python code?
a) wo
b) world
c) sn
d) rl
Explanation: Execute in the shell and verify.
What will be the output of the following Python code?
a) snow
b) snow world
c) Error
d) snos world
Explanation: Strings cannot be modified.
What will be the output of the following Python code?
a) error
b) u
c) t
d) y
Explanation: Max returns the character with the highest ascii value.