Skip to content

Commit b1f137b

Browse files
authored
Update FIND FACTORIAL OF A NUMBER.py
Fixed syntax error
1 parent 5d90556 commit b1f137b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

FIND FACTORIAL OF A NUMBER.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Python program to find the factorial of a number provided by the user.
22

33
def factorial(n):
4-
if n < 0:
5-
return("Oops!Factorial Not Possible")
6-
elif n == 0:
7-
return 1
8-
else:
9-
return n*factorial(n-1)
4+
if n < 0:
5+
return "Oops!Factorial Not Possible"
6+
elif n == 0:
7+
return 1
8+
else:
9+
return n*factorial(n-1)
1010

1111
n = int(input())
1212
print(factorial(n))
13-

0 commit comments

Comments
 (0)