In <0c642381-4dd2-48c5-bb22-b38f2d5b2...@googlegroups.com> 
paul.garcia2...@gmail.com writes:

> 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)

> 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?

"count" is an english word meaning "how many things do I have?", but python
doesn't know that.  In python, "count" is just a name; you could have
called it "hamburger" and python would treat it just the same.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to