Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.35. What does each of these programs do? How many lines of output does each pr

ID: 440674 • Letter: 1

Question

1.35. What does each of these programs do? How many lines of output does each propram produce? What are the last two values of x printed? x 11 while 11x 1, x x/2, pause (.02) end x 1; while x+x x, x 2 x, pause (.02) end x 11 while x+x x, x x/2, pause (.02) end

Explanation / Answer

1) 53 values of x are printed the last two values are 2.22 x 10^-16 1.11 x 10^-16 this program takes initial value of x=1 and does x =x/2 until for 1+x>1 condition is reached. 2)infinite values of x are printed this program takes initial value of x=1 and does x =x*2 until for x+x>x condition is reached. This condition does not converge because 2>1 is a false condition 3) infinite values of x are printed this program takes initial value of x=1 and does x =x/2 until for x+x>x condition is reached. This condition does not converge because 2>1 is a false condition

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote