Question: Directions : Convert the pseudo code for the assignment into python code. Remember v ariable names must be meaningful and you should use the correct

Directions: Convert the pseudocode for the assignment into python code. Remember variable names must be meaningful and you should use the correct data types for any conversions.

Assignment 1: Calculate Factorial

Ask user to enter a number (save to variable)
Use a loop to calculate the factorial of the number entered by the user
o Example: 7! = 7 x 6 x 5 x 4 x 3 x 2 x 1 = 5040
o Hint: You will need a total variable to keep up with number are each multiple. Also, you will need to make sure to decrement the number enter by user by 1 each iteration.
Print answer in the format of: The factorial of 7 is 5040.
o Note: that 7 represents a number that is entered by the user. The answer will changed based off of the number entered by user.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!