Project #88001 - python lab

FizzBuzz Lab(use python!)

Traditionally at the Texas A&M Math Contest there is a game played called "FizzBuzz".

The game starts out at the number 1, and the rules are thus:

*You say "Fizz" if the number is divisible by 3.
*You say "Buzz" if the number is divisible by 5.
*You say both if the number is divisible by 3 and by 5
*You say the number if the number is not divisible by 3 or 5.

Write a program that has a method fizzbuzz(n) that returns the above for the number n.


Test data:

Enter a number : 3
Fizz
Enter a number : 5
Buzz
Enter a number : 45
FizzBuzz
Enter a number : 8

 

Subject Computer
Due By (Pacific Time) 10/20/2015 06:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy