Question: TASK 4 ( OF 4 ) Write a Python script which computes the factorial of a number using a loop ( do not use math.factorial
TASK OF
Write a Python script which computes the factorial of a number using a loop do not use math.factorial Your program should prompt the user for a nonnegative integer, Recall that the factorial of a number, is defined as:
Recall also that and that we cannot calculate the factorial of a negative number or a float decimal number
Ensure your number is not a decimal by using the int function in your input line.
Use a loop to ensure that your input is not negative. If the user enters a negative value, your program should repeatedly ask the user for a nonnegative integer until the user enters a nonnegative integer.
Your program should output using print a mathematical expression showing the numeric input from the user and its factorial. For example, if the user enters the output should look
ENED WD ACTIVITIES AND HOMEWORK
PythON: REPETITION FLOW
something like this:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
