The following Python code will result in an error if the input value is entered as -5.
assert False, 'Spanish'
a) True
b) False
1 thought on “The following Python code will result in an error if the input value is entered as -5.”
a
Explanation: The code shown above results in an assertion error. The output of the code is:
Traceback (most recent call last):
File “”, line 1, in
assert False, ‘Spanish’
AssertionError: Spanish
Hence, this statement is true.
a
Explanation: The code shown above results in an assertion error. The output of the code is:
Traceback (most recent call last):
File “”, line 1, in
assert False, ‘Spanish’
AssertionError: Spanish
Hence, this statement is true.