Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Fizz Buzz Zoom

Received: by 10.180.87.100 with SMTP id w4mr3126548wiz.3.1350352520048;
        Mon, 15 Oct 2012 18:55:20 -0700 (PDT)
MIME-Version: 1.0
Path: q10ni65138164wif.0!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: an...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Fizz Buzz Zoom
Date: Mon, 08 Oct 2012 16:08:35 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 30
Message-ID: <2012Oct8.180835@mips.complang.tuwien.ac.at>
References: <7xhaq645m0.fsf@ruckus.brouhaha.com> <2012Oct8.160229@mips.complang.tuwien.ac.at> <7xpq4tdldn.fsf@ruckus.brouhaha.com>
Injection-Info: mx04.eternal-september.org; posting-host="e3602f98984ce6eff143cbffbeeac014";
	logging-data="1542"; mail-complaints-to="ab...@eternal-september.org";	posting-account="U2FsdGVkX19qjVYD/v9Cal7g438HmZLE"
X-newsreader: xrn 10.00-beta-3
Cancel-Lock: sha1:s7dLmnKZ9KhPoEyDER6fMFJ1rG0=
Bytes: 2183

Paul Rubin <no.em...@nospam.invalid> writes:
>an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> What is the specification?  What is the Python version?
>
>It's a version of the famous FizzBuzz interview question:
>
>  http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
>
>The original question only used "Fizz" and "Buzz" and the most common
>solution involves dealing with the case n%15==0 separately from the
>n%3==0 and n%5==0 cases, which I thought was ugly.

Ok, that specification is:

|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
|both three and five print "FizzBuzz".

Given the separate case in the spec for Fizz Buzz, having a separate
case in the program looks pretty natural to me.

Anyway, what is the specification of Fizz Buzz Zoom?

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/