Question: Question C 1 [ 1 0 marks ] Write your answer in the provided file, A 3 Q 1 . py . Fill in your

Question C1[10 marks] Write your answer in the provided file, A3Q1. py. Fill in your name and student ID in the designated section.
You need to write code related to factorial calculation. Three functions are specified as follows:
1. Function getFactorialNumList()
a. Accept one parameter n , an integer number expected
b. The function body calculates the factorials of all numbers from 0 to the input number n , stores all of them to a Python list, and returns the list to the caller.
2. Function dispFactorialNumList()
a. Accept one parameter \(\mathbf{f L i s t}\), a list of factorial numbers expected
b. The function body shows the factorial numbers contained in the input parameter list when there are data elements in this list. Otherwise, display the message "No factorial numbers". Refer to the sample outputs for display details.
3. Function main () accepts no input parameter and returns no value
a. Ask the user to enter an integer \(\mathbf{n}\).
b. Call the function above to obtain its factorial number.
c. Display the result as the sample display on the console.
d. Assume the inputs are integers only. No need to consider non-integer inputs.
4. Call the main() function to start the program
Hint: Refer to the general guidelines to determine how to call the main() function. Sample Outputs:
Note: The dashed line contains 20 dashes. The user inputs are in green.
Question C 1 [ 1 0 marks ] Write your answer in

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 Programming Questions!