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

31st Jan 2019, 5:31 PM
Jordan Perry
Jordan Perry - avatar
1 Answer
+ 8
Use something like this if num < 0 or not num.is_integer(): print('Error') continue
31st Jan 2019, 6:01 PM
Mert Yazıcı
Mert Yazıcı - avatar