Question
The lesson includes a greatest common divisor program, but then shows you that Python includes a math module with a function that will do this. What is the module and how is it added to your code?(1 point)ResponsesMath module; On line 1, import it with the following:import mathMath module; On line 1, import it with the following: import mathFractions module; On line 1, import it with the following:import fractionsFractions module; On line 1, import it with the following: import fractionsMath module; No need to import, it is automatically included with PythonMath module; No need to import, it is automatically included with PythonGCD module; On line 1, import it with the following:import gcd
Answers
GPT-4o mini
The correct response is:
**Math module; On line 1, import it with the following: import math**
In Python, to use the `math` module, you must import it at the beginning of your code with the statement `import math`. This module includes a function called `gcd` for finding the greatest common divisor.
**Math module; On line 1, import it with the following: import math**
In Python, to use the `math` module, you must import it at the beginning of your code with the statement `import math`. This module includes a function called `gcd` for finding the greatest common divisor.