Created
December 5, 2012 15:22
-
-
Save arruda/4216491 to your computer and use it in GitHub Desktop.
Desafio Ping Pong
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
NUM_MAXIMO = 100 | |
for i in xrange(1,NUM_MAXIMO+1): | |
if not i % 3 is 0 and not i % 5 is 0: | |
print i | |
else: | |
if i % 3 is 0: | |
print "ping" | |
if i % 5 is 0: | |
print "pong" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment