Computer Science, asked by williambarnes, 1 year ago

wha is the result

c = 1

sum = 0

while (c < 10):

  c = c + 3

  sum = sum + c


print (sum)

Answers

Answered by Simran200211
0
the output would be

4

11

21

if sum is inside the loop......
and

21
if print(sum) is outside the loop

williambarnes: thanks!
Simran200211: your wlcm
Answered by aishaaa60
0

72 if print (sum) is out of the loop


williambarnes: i dunno what wll work best so ill try both!
aishaaa60: yap
aishaaa60: use braces for best results in loops
aishaaa60: actually it's mandatory in loop to uses braces
Similar questions