What will be the output of the following Python code?
x=10
y=8
assert x>y, 'X too small'
a) Assertion Error
b) 10 8
c) No output
d) 108
1 thought on “What will be the output of the following Python code?”
c
Explanation: The code shown above results in an error if and only if xy, there is no error. Since there is no print statement, hence there is no output.
c
Explanation: The code shown above results in an error if and only if xy, there is no error. Since there is no print statement, hence there is no output.