Re: A Program that prints the numbers from 1 to 100

2015-11-16 Thread Chris Angelico
On Tue, Nov 17, 2015 at 12:39 AM, Jussi Piitulainen wrote: > This one recycles fish in a way that looks a bit worrying but it seems > to work. Recycles fish? http://www.saigan.com/kidscorner/comics/unhfulb.jpg ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: A Program that prints the numbers from 1 to 100

2015-11-16 Thread Jussi Piitulainen
Chris Angelico writes: > > Here's another version, but with a deliberate bug in it. [- -] This one recycles fish in a way that looks a bit worrying but it seems to work. If there's a bug, it's not deliberate. Except stopping at 15 is deliberate. from contextlib import contextmanager as fish from

Re: A Program that prints the numbers from 1 to 100

2015-11-16 Thread Chris Angelico
On Mon, Nov 16, 2015 at 10:57 PM, wrote: > This would help, but try to write on your own to improve, else you cant make > this going long > Here's another version, but with a deliberate bug in it. You may use this code if and only if your comprehension is sufficient to detect and correct th

Re: A Program that prints the numbers from 1 to 100

2015-11-16 Thread harirammanohar159
On Saturday, 14 November 2015 23:04:40 UTC+5:30, Cai Gengyang wrote: > I want to write a program in Python that does this > > "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 multi

Re: A Program that prints the numbers from 1 to 100

2015-11-16 Thread Ammammata
Il giorno Sat 14 Nov 2015 07:18:18p, *BartC* inviava su comp.lang.python il messaggio news:n27tp6$ec5$1...@dont-email.me. Vediamo cosa scrisse: > Here's one way +1 :) -- /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\ -=- -=- -=- -=- -=- -=- -=- -=- - -=- > http://www.bb2002.it :) < ..

Re: A Program that prints the numbers from 1 to 100

2015-11-14 Thread Steven D'Aprano
On Sun, 15 Nov 2015 04:34 am, Cai Gengyang wrote: > I want to write a program in Python that does this > > "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 > p

Re: A Program that prints the numbers from 1 to 100

2015-11-14 Thread Mark Lawrence
On 14/11/2015 17:34, Cai Gengyang wrote: I want to write a program in Python that does this "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 numbe

Re: A Program that prints the numbers from 1 to 100

2015-11-14 Thread BartC
On 14/11/2015 17:34, Cai Gengyang wrote: I want to write a program in Python that does this "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 numbe

Re: A Program that prints the numbers from 1 to 100

2015-11-14 Thread Joel Goldstick
On Sat, Nov 14, 2015 at 12:34 PM, Cai Gengyang wrote: > I want to write a program in Python that does this > > "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

A Program that prints the numbers from 1 to 100

2015-11-14 Thread Cai Gengyang
I want to write a program in Python that does this "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