Computer Science, asked by ganapathy49, 2 months ago

Output :
1)
Enter a number : 5
Factorial of 5 is 20


2)
Enter a value of n:4
The sum kf the serious is 76.0

Write a phython program

Answers

Answered by reemaagarwal9889
1

Answer:

uzygsgwhwodosjqbvqhdudud

Answered by FrozenFairy
2

\sf num=int(input("Enter \:a \:number:"))\\</p><p>\sf if(num==0):\\</p><p>\:\:\:\:\:\:     \sf fact=1\\</p><p>\sf fact=1\\</p><p>\sf  for\: i \:in\: range(1,num+1):\\</p><p>  \sf \:\:\:\:\:\:\: fact=fact* *i\\</p><p>\sf print("Factorial \: of" \:,num,"is",fact)

___________________________________________

\sf n=(int(intput("Enter \:a \:value\: for :"))\\\sf s=0.0\\</p><p>\sf for\: i\: in\: range(1,n+1):\\</p><p>\sf \:\:\:\:\:\:a=float(ii)/i\\</p><p>\sf \:\:\:\:\:\:s=s+a\\</p><p>\sf print("The \:sum \:of \:the\: series \:is",s)

Similar questions