Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do this in python 3.8 without numpy Question 3 (10 Points) Greatest Common Divisor Two integers A and B have the greatest common divisor

please do this in python 3.8 without numpy

image text in transcribed

Question 3 (10 Points) 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, hmwk3Q3.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 B and replace the value of B with the value of R. Continue this process within the while-loop until the value of Bis 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago