## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# Another Approach, Is it good?

This is my approach, it works. Wondering if it's fine? name = input("Please enter your name: ") number = int(input("Please enter a number: "))

# making sure the two statements are on separate lines of output.

print("Hello {}! ".format(name)) print("The number {}...".format(number))

# *********************

if number/15 == int(number/15): print("is a FizzBuzz number.") elif number/3 == int(number/3): print("is a Fizz number.") elif number/5 == int(number/5): print("is a Buzz number") else: print("is neither a fizzy or a buzz number.")

# string

Hi Amy!

Objectively, yes it is good since the game functions as expected. However, the TODOs in the exercise are suggested so that we can practice using techniques we've learned which will eventually help enable us to write more efficient code.

I too first had a working solution, but I realized that my code wasn't actually assigning boolean values to the is_fizz and is_buzz variables. Also, while my "if, elif" logic was returning boolean values correctly, the body of my logic was using all ints. I also misunderstood how the modulo % was supposed to be used. All of this didn't dawn on me until I watched the solution video!

Hi Amy,

It's an interesting concept you got there! I myself came up with a solution of dividing the number for 15 instead of using the "and" function boolean. I think it works fine so far.

Cheers.

My code failed!!!!

I try this challenge in another way. I used method .is_integer() to valid if is true or false.

```if (number/3).is_integer():
if (number/5).is_integer():
print("{} is a FizzBuzz number.".format(number))
else:
print("{} is a Fizz number.".format(number))
elif (number/5).is_integer():
print("{} is a Buzz number.".format(number))
else:
print("{} is neither a fizzy or a buzzy number.".format(number))
```