Calculate factor
Write a program that receives a number of input and the factoriel calculates and prints it
Write a program that receives a number of input and the factoriel calculates and prints it
let msg = 'error' alert(msg)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
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
num = int (input ('Enter a number: '))
x = 1
for i in range (1, num+1):
x *= i
print (x)
n=int(input("please enter a number here:")) i=1 for m in range(1,n+1): i=i*m print(i)
def factorial(num): if num == 1: return 1 return num * factorial(num-1) num = int(input('Enter number:')) print(f'{num}! = {factorial(num)}')
a=int(input("a:")) b=1 for c in range(1,a): b=b*c print(b*a)
Hi I don't understand that part b*c.
a = int(input("Enter Num :")) for i in range(1 , a): a *= i print(a)
def factorial(i): for j in range (1,i): i*=j print(i) a=int(input('num:')) print(factorial(a))
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)
Submitting answers is currently unavailable.
Write a function that receives a list (array) as a parameter, and deletes its duplicate items and returns the new (array) list
Write a program that translates the following words from Farsi to English and vice versa. The program must be implemented infinitely and it is possible to add new words easily words: Hello = hello goodbye = bye Kata ...
Write a program that receives a store product listing including name and product price and will continue until the amount of empty value for the product name is entered; Then the product name is displayed as a list ...
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.