0
How do I make it say âErrorâ when input for factorial is 0
Currently it gives the wrong answer when input for Factorial is negative. How do I make it have an error message https://code.sololearn.com/cFGQs3orqwRc/?ref=app
1 Answer
+ 8
Use something like this
if num < 0 or not num.is_integer():
print('Error')
continue