def factorial(n): if n == 0:return 1else:return n * factorial(n - 1)num = int(in
19-03-2024
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n - 1)
num = int(input("Enter a number: ")) print("Factorial:", factorial(num))
Copyrights © 2024 letsupdateskills All rights reserved