Hacker News new | ask | show | jobs
by alimw 3684 days ago
That's exactly how I'd do it! What's supposed to be the better way? Modulo/division by three and five?
2 comments

    for x in xrange(1,101):
        if not x % 3:
            print "Fizz",
        if not x % 5:
            print "Buzz",
        if (x % 3) and (x % 5):
            print x
        else:
            print ""
>Modulo/division by three and five?

And fifteen.