News

Prompt user to input a value checks if the value is negative or positive if negative user is asked to give another number if positive loop breaks and factorial is calculated.
num = int(input("Enter your number: ")) #taking input from user print(math.factorial(num)) #using Factorial function.
To start writing and running Python programs locally on your device, you must have Python installed and an IDE (Integrated ...