Computer Science, asked by atahrv, 7 months ago

num=2
count=1
sum=0;
while num<10:
sum=sum+num
num+=3
print(num, ":", sum)
Convert this into while loop.
Language - python

Answers

Answered by Shs07
3

You used while loop correctly but your code will give errors becoz

indentation are not proper.

num=2

count=1

sum=0;

while num<10:

sum=sum+num

num+=3

print(num, ":", sum)

Answered by temporarygirl
2

Hola mate

Here is your answer -

You used while loop correctly but your code will give errors becoz  indentation are not proper.

num=2

count=1

sum=0;

while num<10:

sum=sum+num

num+=3

print(num, ":", sum)

Similar questions