+ 2
What is the error ?
I did this code that define a function that return the kcal value to kj but there is no output why ? https://code.sololearn.com/cu3RDKt6MCrx/?ref=app https://code.sololearn.com/cu3RDKt6MCrx/?ref=app https://code.sololearn.com/cu3RDKt6MCrx/?ref=app
1 Respuesta
+ 2
Well assert gives the AssertionError if the condition is NOT met. Therefore, what you should be doing is:
assert (x>=0), "Negative!"