Calculating Factorial of a number using Function | Python Tutorial in Hindi

preview_player
Показать описание
Whatsapp Number : +919212535516

Facebook Page :

Рекомендации по теме
Комментарии
Автор

def factorial(a):
fact=1
for i in range(a, 0, -1):
fact=fact*i
return fact
n=int(input("Enter a number:"))
sum=0
for num in range(1, n+1):
sum+=num/factorial(num)
print("Sum of series is :", sum)

rajinderrandhawa
Автор

def factorial(a):
fact=1
for p in range(a, 0, -1):
fact*=p
return fact
n=int(input("enter a no. "))
sum=0
for p in range(1, n+1):
sum+=p/factorial(p)
print(sum)

arpitpal
Автор

#using a for loop to call your factorial function, to print out first 36 factorial of a number
def factorial (n: int) ->int:
If n<=1:
return 1

result=2
for x in range(3, n+1) :
result*=x
return result

for i in range(36):
print(i, factorial(i))




Mam can u help me with the for loop used here.

vivekkumarmahto
Автор

Mam can you do the same one using void and non-void function?

eunoiavibes
Автор

Sum of function in a Can u show this one

musicloveri
Автор

create a list of 10 integers (by given user input) and print the factorial of odd number. Plz help me how to do?

tahseemahmed
Автор

if any one want to connect with you through whats app it is possible to ask the questions on same

kapileshkumar
join shbcf.ru