Question: help Write a program that uses the Python math library to find find some values for some integers Objectives - to learn to use functions
help
Write a program that uses the Python math library to find find some values for some integers Objectives - to learn to use functions that come from external modules - to become familiar with the dot notation of external modules - to reinforce the idea of arguments to functions (what needs to be passed to a function) Description The Python math module contains several functions you can do, as described in the chapter. In this lab, you will ask the user for two integers, then find their greatest common divisor and print it out. The function in the math module that will find the greatest common divisor of two numbers is called gcd(a,b) where a and b are the two integers. After that, find the factorial of the greatest common divisor and print it. The factorial function in the math library is called factorial (x) where x is the number you want the factorial of. You may use any prompts you would like in order to input the numbers. Hint: Factorials can get large very quickly, so you might want to test with smallish integers (say less than 100) Ex: If the input is: Enter first integer: 36 Enter second integer: 24 Then the output is: greatest common divisor of 36 and 24 is 12 12 factorial is 479001600
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
