+ 1
Is the question is wrong ?
I executed this program and the output was 3 ?!
6 Respuestas
+ 10
This is because the assertion evaluated False whereas the first one was True so it will output like above
Python's assert statement is a debugging aid that tests a condition. ... But if the assert condition evaluates to false, it raises an AssertionError exception with an optional error message. The proper use of assertions is to inform developers about unrecoverable errors in a program.
+ 9
Ashwin Bharathithasan Which program ??
Be clear while asking 😊
+ 9
which code? can you please share the link of that code then you will get some helpful answer
+ 1
print(0)
assert h != w
print(1)
assert False
print(2)
assert True
print(3)
0
in the question, they asked the highest no in this program,the and is 1 ...
0
but my output was 3?