miscellaneous topics this consists of several common techniques and some other useful information counting very often we want our programs to count how many times something happens for instancea video game may need to keep track of how many turns player has usedor math program may want to count how many numbers have special property the key to counting is to use variable to keep the count example this program gets numbers from the user and counts how many of those numbers are greater than count for in range( )num eval(input'enter number')if num> count=count+ print'there are 'count'numbers greater than 'think of the count variable as if we are keeping tally on piece of paper every time we get number larger than we add to our tally in the programthis is accomplished by the line count=count+ the first line of the programcount= is important without itthe python interpreter would get to the count=count+ line and spit out an error saying something about not knowing what count is this is because the first time the program gets to this lineit tries to do what it saystake the old value of countadd to itand store the result in count but the first time the program gets therethere is no old value of count to useso the python interpreter doesn' know what to do to avoid the errorwe need to define countand that is what the first