Computer Science, asked by kalpana4987, 11 months ago

programm me" sum" ka anuman lagaye sum=0 for i in range(1,11,2): sum+ =i print"sum=" ,sum

Answers

Answered by sswaraj04
2

Answer:

Explanation:

i in range (1,11,2)

means i will have value 1 , 3 , 5 ,......, 9

sum=0

sum+=i

i = 1

sum + = 1  // sum =1

i = 3

sum + = 3  // sum =4

i = 5

sum + = 5  // sum =9

i = 7

sum + = 7  // sum =16

i = 9

sum + = 9  // sum =25

print("sum=")

sum = 25

Hope it helps :-)

Similar questions