Computer Science, asked by mohammedshifan, 5 months ago

n=10

for i in range(0,n+1,2)

s+=i

print(“s=”,s)​

Answers

Answered by subgb98
0

Answer:

your code has errors if you remove that errors

n=10

for i in range(0,n+1,2):

        s+=i

print("s=",s)

output:

s=30

Answered by anindyaadhikari13
1

Answer:-

The given code has some errors, after correction, it will be,

n=10

for i in range(0,n+1,2):

s+=i

print(“s=”,s)

Calculation:-

s=0+2+4+6+8+10=30

Output:-

s=30

Similar questions