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

2
votes
2answers
73 views

Idiomatic Ruby FizzBuzz

Can anyone offer any criticism on the following at a simple FizzBuzz in terms of Ruby idioms or otherwise? ...
8
votes
2answers
109 views

Is my implementation of FizzBuzz overkill?

I am doing FizzBuzz on a take home test (in Unity). I am sure this is just a competency check, but I went ahead and followed some coding conventions such as using constant fields, dependency ...
7
votes
1answer
58 views

Extensible FizzBuzz in Ruby

The title says it all. This is yet another FizzBuzz implementation where you can specify the words you want to use, though it autoselects the divisors as the first n primes other than 2, rather than ...
12
votes
2answers
172 views

FizzBuzzLizardSpock

I decided that since I was learning AngularJS and Bootstrap, I'd be remiss not to post a FizzBuzz, but FizzBuzz bores me, so I've extended it. My version of FizzBuzz is configurable, and allows you ...
3
votes
2answers
73 views

FizzBuzzWoofFooBar - follow-up

I took all your suggestions to heart and I think it improved the code a lot. The Map got it's own typedef: ...
6
votes
2answers
77 views

FizzBuzz-like Assignment

I have an assignment for my Java programming class that is kind of an expanded FizzBuzz-like question: Write a program that iterates through numbers from 0 to 113 using a loop. Print the ...
15
votes
1answer
175 views

Ultimate FizzBuzz

Swift's SequenceType is a useful means of generating a sequence of values, and it makes it particularly useful iterate over these values. I don't really have much ...
11
votes
2answers
225 views

FizzBuzzWoofFooBar

My C++ was starting to get rusty and I never touched some of the newer features. Reason enough to try something simple and make it overly complicated: FizzBuzz with bonus features. For now we'll call ...
3
votes
2answers
142 views

FIZZ BUZZ -challenge program with adjustable intervals

This is again a solution to the codeEval challenge #1. It was accepted by codeEval, but please let me know if I can improve it anyway somehow? ...
4
votes
2answers
66 views

Reducing memory usage for FizzBuzz in R

I've been trying all night to get my fizzbuzz to use below 20 MB of RAM but I can't seem to get it much smaller than this. ...
6
votes
1answer
73 views

General Fizzbuzz

I'm learning Rust now and created a program to solve the task General Fizzbuzz on Rosetta Code. For example, given: 20 3 Fizz 5 Buzz 7 Baxx where the first line ...
4
votes
2answers
42 views

FizzBuzz Kickoff

My first FizzBuzz question (well, I asked, then deleted, one previously), and my very first VB.NET question. ...
3
votes
3answers
114 views

Java FizzString

I am testing what knowledge I have with the FizzBuzz tests in Java. This is the one I just completed: Given a string str, if the string starts with "f" return "Fizz". If the string ends with "b" ...
2
votes
2answers
89 views

Improving the efficiency of my FizzBuzz algorithm [closed]

I worked on an exercise from codewars, which is a variation of the popular fizzbuzz game. (If the link doesn't work, you may need to reload the page.) In this variation, I'm supposed to find the sum ...
5
votes
1answer
121 views

Fizzbuzz in Python

I'm new to Python and wondering what can be improved with the following super novice program - in terms of the solution and code style etc. test_fizzbuzz.py ...
8
votes
2answers
117 views

FizzBuzz Challenge

This bit of code is a small game to see how long you play a game of FizzBuzz without messing up. Code: The top of the code: ...
3
votes
1answer
99 views

FizzBuzz from a file

This was found on CodeEval. Challenge: Write a program that prints out the final series of numbers where those divisible by X, Y and both are replaced by “F” for fizz, “B” for buzz and “FB” for fizz ...
3
votes
1answer
230 views

FizzBuzz-type program that reads/writes to Excel

I'm new to Groovy, and coming from PHP it's been a rough transition. The code below works. However, I would appreciate feedback on how better to write it and follow good practice with Groovy. I ...
15
votes
5answers
2k views

Linq me a FizzBuzz

I got this requirement recently: Write some code that prints out the following for a contiguous range of numbers: the number 'fizz' for numbers that are multiples of 3 'buzz' for numbers ...
8
votes
2answers
307 views

FizzBuzz from a casual rubyist

As a casual Rubyist I am mainly interested, how ideomatic my solution is. ...
18
votes
2answers
1k views

Writing FizzBuzz like this makes me feel like a small child

For the sake of full disclosure, this was written with bananas, not apples. The doctor may not be kept away. With AppleScript highlighting: For Copy&Pasting: ...
11
votes
1answer
89 views

Even more extensible and testable BuzzFizz

Inspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such ...
31
votes
7answers
3k views

Who's in the fellowship? When are Frodo, and the rest of the gang, together

As a variant on the fizzbuzz concept, and as an exercise for learning JavaScript, HTML5, and CSS (I know none of them very well). The regular fizzbuzz is somewhat tired, but having a web-based, ...
15
votes
4answers
988 views

Extensible and testable FizzBuzz

There seem no end to fizzbuzz implementations. Something I rarely see is an implementation that's easy to extend with more name-divisor pairs. Another thing that usually annoys me is the lack of ...
1
vote
2answers
94 views

FizzBuzz Solution Rags to Different Rags [closed]

I took some code and reviewed it, but it got me thinking, so I re wrote the code a little bit and would like to ask what you think of it and why it's bad to do this, even though it works. ...
12
votes
10answers
2k views

FizzBuzz Problem Solution

I wrote this simple solution about FizzBuzz. Is there any possible way to solve or optimize the solution, such as with bitwise tricks? ...
14
votes
2answers
720 views

FizzBuzz example in Python for game manual

I'm developing an implementation of the FizzBuzz game as part of an edutainment game for a retro video game platform. In its manual, I want to mention the history of writing a bot for the FizzBuzz ...
10
votes
8answers
1k views

FizzBuzz using switches

I'm learning about control structures now, and I want to see if I'm doing this as cleanly and efficiently as possible. Seems like there should be a less... verbose way of writing the ...
5
votes
1answer
209 views

The Functional FizzBuzz Kata

I run a coding dojo at work. For one session I'm to showing that you can use a kata to get into a new language. I'm using the FizzBuzz Kata to to show F# (and JavaScript) because it is short. The ...
8
votes
2answers
548 views

The Scripted FizzBuzz Kata

I run a coding dojo at work. for one session I'm to showing that you can use a kata to get into a new language. I'm using the FizzBuzz Kata to show JavaScript (and F#) because it is short. The ...
7
votes
2answers
389 views

FizzBuzz with user input variables

Yes, another FizzBuzz! I know you guys may be tired of these but I think it's a tradition stepping stone for beginners on this site. Here are some notes on my thinking: I tried to keep it as ...
10
votes
3answers
128 views

FizzBuzz vs. FortRan

In keeping with using FizzBuzz as an introduction to a language, I present FizzBuzz with a Fortran95 twist: For multiples of 3, print Fort, and for 5's multiples ...
2
votes
2answers
155 views

Fizz Buzz in JS

This is a simple JavaScript Fizz Buzz solution based on a Codecademy exercise. I refactored it down a few lines after seeing these implementations. I wanted to post here and see what else I can ...
8
votes
3answers
971 views

Simple FizzBuzz

I wanted to try FizzBuzz, but to do it in the most efficient way. I think this method employs most of the concepts I learned here. Is there anything unaccounted for? A sprinkle of Swing since that's ...
6
votes
1answer
85 views

Wrapping JS file in function, and assigning that function to a variable

I've been reading about wrapping JS files in functions to call them on load, etc. I also was looking at namespaces and how to avoid collisions with functions/objects/variables of the same name. What ...
67
votes
3answers
6k views

Down with FizzBuzz… LOL

This post is the result of reading through and following the LOLCODE Specification 1.2 ("smoking the manual", right?), and writing and executing my code on compileonline.com. My "hello world" was ...
31
votes
9answers
3k views

Which FizzBuzz is better, and why?

I was in an interview and the guy asked me to do the typical FizzBuzz question of printing numbers 1-100, but for each factor of 3 print Fizz, each factor of 5 print Buzz, and each factor of both ...
8
votes
2answers
177 views

Basic Imitation of C# Enumerable in VBA - or any other static class

Since implementing static classes in VBA actually seems possible I came up with an idea to try to imitate C#' Enumerable class (well, to some extent...). This is ...
8
votes
2answers
158 views

No more Fizzbuzz. How about Hello World instead?

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of ...
10
votes
1answer
149 views

Object-Oriented FizzBuzz in Ruby

I don't use Ruby on a regular basis, but I felt inspired to write an extensible, object-oriented version of FizzBuzz to sharpen my skills. I welcome all feedback. The main class: ...
1
vote
1answer
38 views

Ways to express proc inside a method

I'm interested in seeing different ways the proc can be expressed inside a method that takes args. This method is meant to be a sort of FizzBuzz that will dynamically replace "Fizz" or "Buzz" as well ...
32
votes
2answers
2k views

Tired of FizzBuzz yet?

There have been many FizzBuzz questions lately, and here is one more! Granted, it is pretty straightforward to do FizzBuzz with SQL using calculations. So instead, I'm going to do a FizzBuzz which ...
40
votes
1answer
2k views

FizzBuzz in Brainfuck

Inspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck. The code is entirely my own, except for the inclusion of the Printing a ...
8
votes
2answers
96 views

FizzBuzz in SQLite 2

This query performs a FizzBuzz in SQLite 2.8.17 without creating any tables or sprocs. First attempt: ...
7
votes
1answer
114 views

Multi-process FizzBuzz in Elixir

So I was playing with writing FizzBuzz in Elixir; this is my first, naive implementation: ...
17
votes
5answers
3k views

FizzBuzz in Ruby

I have this implementation of the FizzBuzz challenge in Ruby: ...
15
votes
2answers
383 views

FizzBuzz in Commodore Basic

...
12
votes
3answers
220 views

Haskell FizzBuzz with a type system

The core problem is simple enough, but I've developed a type system that I'm not sure about. The intention is, if the result is a number, calling ...
10
votes
2answers
136 views

VBuzz all fizzed up

I don't normally write vb.net code, and I would rather maintain a monstruous vb6 project than a simple vb.net one. There's something about fizzbuzz going on this weekend, that pushed me to write ...
6
votes
4answers
178 views

FizzBuzz - officially now in CLISP

I had to jump on the bandwagon for this one. The task does a great job of helping you learn a language you're unfamiliar with. So today I present you with my version of the infamous FizzBuzz game in ...