From 2ae3831dedf9e984fa3adc385a2a8161e40b8b79 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 24 Sep 2010 13:43:38 +0200 Subject: [PATCH] added a solution --- fizzbuzz.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fizzbuzz.py diff --git a/fizzbuzz.py b/fizzbuzz.py new file mode 100644 index 0000000..3024740 --- /dev/null +++ b/fizzbuzz.py @@ -0,0 +1,11 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +for i in xrange(1,101): + if i % 15 == 0: + print "FizzBuzz" + elif i % 3 == 0: + print "Fizz" + elif i % 5 == 0: + print "Buzz" + else: + print i