Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 48a698f89c9d6a8936e709ff7d76a2522551f462 Mon Sep 17 00:00:00 2001
- From: Justin Herrick <justin@justinherrick.com>
- Date: Thu, 3 Jun 2010 17:50:49 -0400
- Subject: [PATCH] second commit. Not really a commit, just added the python version
- ---
- fizzbuzz.py | 16 ++++++++++++++++
- 1 files changed, 16 insertions(+), 0 deletions(-)
- create mode 100644 fizzbuzz.py
- diff --git a/fizzbuzz.py b/fizzbuzz.py
- new file mode 100644
- index 0000000..aff7350
- --- /dev/null
- +++ b/fizzbuzz.py
- @@ -0,0 +1,16 @@
- +def fizzbuzz(num):
- + x=1
- + while x < num+1:
- +
- + if x%3 == 0 and x%5 == 0:
- + print "fizzbuzz"
- + elif x%5 == 0:
- + print "buzz"
- + elif x%3 == 0:
- + print "fizz"
- + else:
- + print x
- + x+=1
- +
- + #end
- +#end
- --
- 1.7.0.3+GitX
Add Comment
Please, Sign In to add comment