[PYTHON] Fizz Buzz

FizzBuzz.py


for x in xrange(1,101):
	if x % 3 is 0 and x % 5 is 0:
		print "FizzBuzz"
	elif x < 100 and x % 3 is 0:
		print "Fizz"
	elif x < 100 and x % 5 is 0:
		print "Buzz"
	else :
		print x

Recommended Posts

Fizz Buzz
Fizz Buzz en Python
Essayons Fizz Buzz avec Python
J'ai écrit Fizz Buzz en Python