Guest User

Untitled

a guest
May 27th, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. From 48a698f89c9d6a8936e709ff7d76a2522551f462 Mon Sep 17 00:00:00 2001
  2. From: Justin Herrick <justin@justinherrick.com>
  3. Date: Thu, 3 Jun 2010 17:50:49 -0400
  4. Subject: [PATCH] second commit. Not really a commit, just added the python version
  5.  
  6. ---
  7. fizzbuzz.py | 16 ++++++++++++++++
  8. 1 files changed, 16 insertions(+), 0 deletions(-)
  9. create mode 100644 fizzbuzz.py
  10.  
  11. diff --git a/fizzbuzz.py b/fizzbuzz.py
  12. new file mode 100644
  13. index 0000000..aff7350
  14. --- /dev/null
  15. +++ b/fizzbuzz.py
  16. @@ -0,0 +1,16 @@
  17. +def fizzbuzz(num):
  18. + x=1
  19. + while x < num+1:
  20. +
  21. + if x%3 == 0 and x%5 == 0:
  22. + print "fizzbuzz"
  23. + elif x%5 == 0:
  24. + print "buzz"
  25. + elif x%3 == 0:
  26. + print "fizz"
  27. + else:
  28. + print x
  29. + x+=1
  30. +
  31. + #end
  32. +#end
  33. --
  34. 1.7.0.3+GitX
Add Comment
Please, Sign In to add comment