Created
December 9, 2016 02:23
-
-
Save deidyomega/0b7c2df6c6efcd6aa4b3d7815fec4f59 to your computer and use it in GitHub Desktop.
Code Fight Python (incorrect)
This file contains 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
import pprint | |
def CodeFight(n): | |
lst = [] | |
for x in xrange(1,n+1): | |
if x % 5 == 0: | |
o = "Code" | |
elif x % 7 == 0: | |
o = "Fight" | |
else: | |
o = str(x) | |
lst.append(o) | |
pp = pprint.PrettyPrinter(indent=0) | |
return pp.pprint(lst) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment