Question

def ged(m,n) : if m n == 0: return n else: return god (n, møn) Without typing the code into Python, what are the values of th
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer is m = 9 and n = 8.

Explanation:

When the first call is made from main function, the input arguments will be m=537 and n=44.

In the function gcd, if condition is not true so it goes to else block. This is the first recursive call to the function. The input arguments will be m=44 and n=9.

After the first recursive call also the if condition will not be true so it goes to else block. This is the second recursive call to the function. The input arguments will be m=9 and n=8.

Add a comment
Know the answer?
Add Answer to:
def ged(m,n) : if m n == 0: return n else: return god (n, møn) Without...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT