Computer Science
When the following code runs, how many times is the line "x = x * 2" executed?
x = 1
while ( x < 20 ):
x = x * 2
- 2
- 5
- 19
- 4
- 32
Python Control Flow
27 Likes
Answer
5
Answered By
5 Likes
Related Questions
Which of the following are jump statements ?
Consider the following code segment :
for i in range(2, 4): print(i)What values(s) are printed when it executes?
What is the output when this code executes ?
x = 1 while (x <= 5): x + 1 print(x)How many times does the following code execute ?
x = 1 while (x <= 5): x + 1 print (x)