63.7k views
1 vote
Python

c = 1

sum = 0

while (c < 10):

c = c + 2

sum = sum + c




print (sum)

User Vks
by
7.7k points

1 Answer

4 votes

Since I cannot tell where the indents (spaces) in the code are, there are two possible answers.

If the "while" part of the code looks like this, with a space before both the second and third line:

while (c < 10):

c = c + 2

sum = sum + c

the answer is 35.

If the "while" part of the code looks like this, with space only before the second line:

while (c < 10):

c = c + 2

sum = sum + c

the answer is 11.