I'm trying to figure out how to run my functions from my homework file. I opened up terminal, changed the directory to desktop (where my hw1.py file is), started up python, then typed "import hw1". Then I type in fizzbuzz(15) and it returns this statement:
Traceback (most recent call last): File "<stdin>", line 1, in <module>
My only function I'm trying to run is:
def fizzbuzz(n):
if (n % 3) == 0 and (n % 5) == 0:
return "FizzBuzz"
elif (n % 3) == 0:
return "Fizz"
elif (n % 5) == 0:
return "Buzz"