On Sat, Nov 14, 2015 at 12:34 PM, Cai Gengyang <gengyang...@gmail.com> 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 numbers which are multiples of both three and five print > "FizzBuzz"." > > How do I go about doing it ? > -- > https://mail.python.org/mailman/listinfo/python-list > You could google fizzbuzz and find lots of solutions. But, to give you a hint, use a for loop with range to get the numbers, use if n % 3 and n % 5 to pick out 3 and 5 multiples, print accordingly -- Joel Goldstick http://joelgoldstick.com/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list