Solved

Use a Repeat Loop Rather Than a While Loop to Accomplish

Question 25

Essay

Use a repeat loop rather than a while loop to accomplish the same results as the following program segment.Assume that X will have only integer values.(You may also use an if statement if you like.)
 while (X<5): print (X)X=X+1\begin{array} { c } \text { while } ( \mathrm { X } < 5 ) : \\\text { print } ( \mathrm { X } ) \\\mathrm { X } = \mathrm { X } + 1\end{array}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions