diff --git a/factorial.py b/factorial.py index 7b24c2a..8d80864 100644 --- a/factorial.py +++ b/factorial.py @@ -6,8 +6,8 @@ # check if the number is negative, positive or zero if num < 0: print("Sorry, factorial does not exist for negative numbers") -#issue - if the num = 0 then its factorial is 1. -#add a condition for that. +elif num == 0: + print("The factorial of 0 is 1") else: for i in range(1,num + 1): factorial = factorial*i