Question: Consider the following code snippet. If num _ a is 2 4 and num _ b is 7 2 , then the output will be

Consider the following code snippet. If num_a is 24 and num_b is 72, then the output will be _____.
num_a = int(input('Enter first positive integer:
'))
num_b = int(input('Enter second positive integer:
'))
while num_a != num_b:
if num_b > num_a:
num_b = num_b - num_a
else:
num_a = num_a - num_b
print('GCD is %d'% num_a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!