CodeSolved

Solved Programming Questions & Exercises

Calculate factor

Practice Easy 32/ Download 2237 Views

Write a program that receives a number of input and the factoriel calculates and prints it

18 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
n=int(input("please enter a number here:"))
i=1
for m in range(1,n+1):
    i=i*m
print(i)
Chef.nasim Download Python
def factorial(num):
    if num == 1:
        return 1
    return num * factorial(num-1)
num = int(input('Enter number:'))
print(f'{num}! = {factorial(num)}')
User 251 Download Python

Hi I don't understand that part b*c. User 3227


a = int(input("Enter Num :"))
for i in range(1 , a):
    a *= i
print(a)
Programmer Download Python
def factorial(i):
  for j in range (1,i):
     i*=j
     print(i)
a=int(input('num:'))
print(factorial(a))
Maryam.n Download Python
f = int (input("f:  "))
if f < 0:
    print ("adda mosbat vared kon")
elif f==0 :
    print("1")
else:
    x = 1
    for j in range(1 , f+1):
        x *=j
    print (x)
Esmaeelphy Download Python
num = int(input("enter your number:"))
a = 1
for i in range(1,num+1):
    a = a * i
else:
    print(a)
Sumy.amiri Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close