what is the answere | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is the answere

print(0) assert "h" != "w" print (1) assert False print(2) assert True print(3)

23rd Feb 2020, 3:40 AM
Nithish kumar R
Nithish kumar R - avatar
2 Answers
+ 2
//Sorry for including external link ,but you need information about assert usages https://stackoverflow.com/questions/5142418/what-is-the-use-of-assert-in-JUMP_LINK__&&__python__&&__JUMP_LINK
23rd Feb 2020, 3:55 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
the output is 0 1 AssertionError Because first you print 0, then you check if h doesnt equal w, it doesnt, so prints 1 Then you assert False which is false, so an AssertionError is raised
23rd Feb 2020, 10:20 AM
QWKKK
QWKKK - avatar