Course Solutions Uncategorized (Solved) : Find Gcd Using Python Two Numbers Def Gcd Print Enter Two Numbers Algorithm Find Greatest Q30672837 . . . .

(Solved) : Find Gcd Using Python Two Numbers Def Gcd Print Enter Two Numbers Algorithm Find Greatest Q30672837 . . . .

 

Find GCD using python with two numbers only.

def gcd():
print(“Enter two numbers. This algorithm will find the greatestcommon denominator.”)

a = int(input(“Enter input A: “))
b = int(input(“Enter input B: “))
while not b == 0:
if(b == 0):
return a
else:
c = a % b
return c, b

print(“GCD is”, c)

gcd()

I need an explanation on why there is no output based onmy code and what is the correct approach.

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : toreduce costs, cut overhead, speed up 30) A___ is consistent with recent effort by ampanies decision making, increase flexsbility(Answered) : toreduce costs, cut overhead, speed up 30) A___ is consistent with recent effort by ampanies decision making, increase flexsbility

toreduce costs, cut overhead, speed up 30) A___ is consistent with recent effort by ampanies decision making, increase flexsbility, get closer to customers, and empower employees increase flexibility, get closer