<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:18pt"><DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 18pt"><BR>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>----- Forwarded Message ----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Richard Hultgren <hultgren1946@yahoo.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> tutor@python.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Mon, December 7, 2009 2:53:40 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> loops</FONT></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>I'm quite new but determined. Can you explain to me, step by step, what is going on in the computer in this loop. I hope I am not being too dumb!<BR></FONT><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 18pt">
<DIV>a = 0<BR>b = 1<BR>count = 0<BR>max_count = 20<BR><SPAN class=kw1><STRONG><FONT color=#ff7700>while</FONT></STRONG></SPAN> count <SPAN class=sy0><FONT color=#66cc66><</FONT></SPAN> max_count:<BR> count = count + <SPAN class=nu0><FONT color=#ff4500>1</FONT></SPAN><BR> <SPAN class=co1><EM><FONT color=#808080># we need to keep track of a since we change it</FONT></EM></SPAN><BR> old_a = a <FONT color=#ff0000># especially here</FONT><BR> old_b = b<BR> a = old_b<BR> b = old_a + old_b<BR> <SPAN class=co1><EM><FONT color=#808080># Notice that the , at the end of a print statement keeps it</FONT></EM></SPAN><BR> <SPAN class=co1><EM><FONT color=#808080># from switching to a new
line</FONT></EM></SPAN><BR> <SPAN class=kw1><STRONG><FONT color=#ff7700>print</FONT></STRONG></SPAN> old_a,<BR></DIV></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><BR></DIV></DIV><!-- cg13.c4.mail.gq1.yahoo.com compressed/chunked Mon Dec 7 00:53:08 PST 2009 --></div><br>
</body></html>