I have been given this question to do in Python:
Take in a list of numbers from the user and run FizzBuzz on that list.
When you loop through the list rememb
A few issues with your code here. The first issue is that, for comparison, you should be using ==, not =, which is for assignment.
The second issue is that you want to check that the remainder of the divisions (which is what the modulo operator calculates) is zero, not that it's true, which doesn't really make sense.
You should be using elif for "otherwise if..." and else for "otherwise." And you need to fix the formatting of your else clause.
You want:
n=input()
if n%3 == 0:
print("Fizz")
elif n%5 == 0:
print ("Buzz")
else:
print n
Finally, your code does not meet the spec:
1) If the number is divisible by both 3 and 5 print "FizzBuzz"
The above will not do this. This part I'm going to leave to you because I'm not here to solve the assignment for you :)