Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help with python EDIT: hmwk3q3 is just what the file is supposed to be named Greatest Common Divisor Two integers A and B have
please help with python
EDIT: hmwk3q3 is just what the file is supposed to be named
Greatest Common Divisor Two integers A and B have the greatest common divisor which is the largest positive integer that divides A and B, evenly, without a remainder. One way to find the Greatest Common Divisor is to consider the prime factors for A = 372 and B = 84 as shown below. 372 = 22 * 3 31 84 = 22 +3 : 7 GCD (372,84) = 22 + 3 = 12 In a well-documented Python program, hmwk303.py, query the user for two integers. Use a while-loop to find the remainder R when dividing A by B.Replace the value of A with the value of with the value of B and replace the value of B with the value of R. Continue this process within the while-loop until the value of B is zero. At that time the value of A will be the GCD. In a comment, provide the response to your program when A = 98,025,733,547 and B = 2,345,109,894,323. Grading Comments (+2 points). Input software to query for A and B (+2 points). A correct while-loop (+4 points). The correct value for GCD (+2 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started