Question: Make a Python program using two functions and one while loop. Your program must be similar to the code below. Each function must return its
Make a Python program using two functions and one while loop. Your program must be similar to the code below. Each function must return its value and the returned value must be used in the while loop. You may want to use for loops in the functions.
def factorial(a):
~~~~~
~~~~~
return ~~~~
def factors(a):
~~~~~~
~~~~~~
return ~~~~
while True:
your_input_number = int(input(' Enter an integer number: '))
your_choice = input('What do you want? Enter "1" for factorial, Enter "2" for factors, enter "end" to quit: ')
~~~~~
~~~~~

Enter an integer number: 10 What do you want? Enter "1" for factorial, Enter "2" for factors, enter "end" to quit: 1 Factorial of 10 is 3628800 Enter an integer number: 10 What do you want? Enter "1" for factorial, Enter "2" for factors, enter "end" to quit: 2 Factors of 10 are [1, 2, 5, 10] Enter an integer number: 10 What do you want? Enter "1" for factorial, Enter "2" for factors, enter "end" to quit: end End
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
