[Tutor] Frustrated Beginner

Rosalee Dubberly dubberlyr at msn.com
Wed Sep 28 22:41:36 CEST 2005

I am trying to learn Python to use in my lesson plans. I am using Windows XP 
and the textbooks I am using are Beginning Python by WROX and Learning 
Pyhton by O'Reilly.

I am definning a range of words 0 to 55, if the number is divisible by 
3,7,11 with no remainder print eggs, else print spam. This works.

def firstpart():
   for n in range(0, 55):
      if n % 3 == 0 or n % 7 == 0 or n % 11 == 0:
          print 'eggs,',
          print 'spam,',
# Now I am trying to modify the function to replace eggs with toast and spam 
with jelly. I have spent days and nothing works. Can you send me in the 
right direction??
Rosa Dubberly
dubberlyr at msn.com

Don’t just search. Find. Check out the new MSN Search! 

More information about the Tutor mailing list