CSC111 Debugging with Print Statements

From dftwiki3
Revision as of 10:56, 17 February 2014 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- <source lang="python"> sum = 0 i = 0 while i <= 10: if i % 2 == 0: sum = sum + 1 else: i = i + 1 print( "Done!" ) </source> <br /> <br /> <br ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut (talk) 09:56, 17 February 2014 (EST)


sum = 0
i = 0
while i <= 10:
   if i % 2 == 0:
      sum = sum + 1
   else:
      i = i + 1

print( "Done!" )