Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are 
included) that are divisible by 5 (Use while loop)

This is the code: 

x=0
count=0
while x<=100:
    if x%5==0:
        count=count+x
    x=x+1
print(count)
        

Question: How does python know what count means ? I see that its declared. What 
i wanna know is how does it know the iteration or each number it finds 
divisible by 5 is the "Count" ??
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to