Question: PARTICIPATION ACTIVITY 5 . 3 . 1 : Loop example: Greatest common divisor. Use input values of num _ a = 1 5 and num

PARTICIPATION ACTIVITY
5.3.1: Loop example: Greatest common divisor.
Use input values of num_a =15 and num_b =10 in the above GCD program. Answer the questions by mentally executing the statements. If stuck, consider adding additional print statements to the program.
1)
What is the value of num_a before the first loop iteration?
Check
Show answer
2)
What is num_a after the first iteration and before the second?
Check
Show answer
3)
What is num_b after the second and before the third iteration?
Check
Show answer
4)
How many loop iterations will the algorithm execute?
Check
Show answer

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!