A programming challenge, popularized by Jeff Atwood, that prints the numbers from 1 to 100, where multiples of three print "Fizz," multiples of five print "Buzz," and multiples of both three and five print "FizzBuzz."

learn more… | top users | synonyms

4
votes
3answers
279 views
13
votes
4answers
638 views

First Scala FizzBuzz implementation

Would love some feedback on this. I'm coming from a Java background and kinda feel like I've just done exactly what I would do in Java. Is there a better way? ...
3
votes
1answer
74 views

Python Fizz Buzz, Acceptance Unit test

OK, maybe crazy overkill and a little silly, but why not? Here's a Python FizzBuzz Acceptance Test: ...
5
votes
1answer
115 views

Does this FizzBuzz code correctly follow SRP and unit-testing?

This is a code for FizzBuzz. I have also hosted in on my github FizzChecker Tests ...
1
vote
2answers
103 views

How can I remove this for-loop in this competitive FizzBuzz code?

I'v written this code snippet that's part of a code competition. I want to do the trick without the for-loop, or simply find a way to optimize this code for speed. ...
6
votes
2answers
325 views

Fizz Buzz Bizz Fuzz in Java

This questions is originally from http://contestcoding.wordpress.com/2013/06/28/fizz-buzz-bizz-fuzz/. Print the integers from 1 to 100, but for the multiples of 3, print "Fizz" instead and ...
4
votes
1answer
66 views

PseudoBrain FizzBuzz Thoughts

Some recent discussions on this site involved the Fizz-Buzz game - I have never actually implemented this, but for the record this is what I put together: ...
6
votes
1answer
94 views

Review Batch-File FizzBuzz

I've never done a FizzBuzz before, so I decided I would. Please let me know what I could have done better. Run via a .bat file in windows. ...
6
votes
5answers
318 views

Efficient FizzBuzz

I wrote the following Fizz Buzz program. How can I improve it or make it more efficient? ...
3
votes
1answer
203 views

OOP-style FizzBuzz program in PHP

I've tried to write a configurable OOP-style FizzBuzz program in PHP for learning purposes. I hope everything is quite easy to understand. What do you think of the overall architecture? Are OOP ...
2
votes
2answers
121 views

Code review request for fizz buzz

Okay code reviewers, I need you to make my FizzBuzz code even better. Any suggestions for improvement, optimizations, etc. ...
3
votes
3answers
250 views

How can I improve this Haskell code?

This code solves the problem of FizzBuzz. Is it possible in any way to improve it? ...
5
votes
4answers
562 views

What do you think of my Recursive FizzBuzz?

I wanted to see if I fully understood recursion so I attempted the FizzBuzz challenge and applied recursion to it. Did I do it correctly? Is this good code? Is there a more efficient way of doing ...
6
votes
5answers
1k views

Writing FizzBuzz

First of all, I came up with that question on SO already. But I am offered different solution which are "better" in some ways. The goal is to improve this specific version, not to create another ...
4
votes
1answer
710 views

Higher-order FizzBuzz in Clojure

Help me make it better. Requirement: support arbitrary number of factors, not just 3 & 5. ...
3
votes
4answers
4k views

FizzBuzz implementation

The common FizzBuzz implementation I saw is using a check for % 15 for printing "FizzBuzz" Would you let me know if there is anything wrong / better with this approach? ...
10
votes
3answers
6k views

Ultra-Beginner Python FizzBuzz … Am I missing something?

I just started programming in Python this morning, and it is (more or less) my first programming language. I've done a bit of programming before, but never really did much except for "Hello World" in ...
5
votes
2answers
1k views

Ways to improve my coding test FizzBuzz solution for a TDD role?

I had an interview recently where I was asked to produce the traditional FizzBuzz solution: Output a list of numbers from 1 to 100. For all multiples of 3 and 5, the number is replaced ...
6
votes
2answers
1k views

Fizz Buzz interview question code

Reading Jeff Atwood's "Why Can't Programmers.. Program?" led me to think that almost all of the solutions would not be something I would want in my own code-base. The Fizz Buzz program specification ...
7
votes
6answers
2k views

Pythonic FizzBuzz Problem

Below are two solutions to the Fizz Buzz problem in Python. Which one of these is more "Pythonic" and why is it more "Pythonic" than the other? Solution One: ...