POV-Ray : Newsgroups : povray.off-topic : FizzBuzz : Re: FizzBuzz Server Time
4 Sep 2024 05:14:14 EDT (-0400)
  Re: FizzBuzz  
From: Neeum Zawan
Date: 10 Jul 2010 02:18:07
Message: <87wrt3g8px.fsf@fester.com>
Warp <war### [at] tagpovrayorg> writes:

> Neeum Zawan <fee### [at] festercom> wrote:
>> primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
71, 73, 79, 83, 89, 91, 97]
>> for prime in prime:
>>     print prime
>
>   Way to overcomplicate a simple problem. Why not simply:
>
> print 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 91, 97

Because I wanted one prime per line.

(Whew! Glad no one pointed out that my code doesn't work!)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.