Just a simple Fizz Buzz example answer that you guys can dissect and point things out.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
count = 0 while count < = 100 : if ((count % 5 ) = = 0 and (count % 3 ) = = 0 ): print "FizzBuzz" count = count + 1 elif (count % 3 ) = = 0 : print "Fizz" count = count + 1 elif (count % 5 ) = = 0 : print "Buzz" count = count + 1 else : print count count = count + 1 |