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
Make it universal for any integer, positive or negative. Also make it easily expandable to other keywords for any integer by creating a dictionary of keywords.
def checkdict(divdict, i):
out = ""
for key in divdict:
if key != 0:
if i%key==0:
out+=divdict[key]
if key == 0 and i == 0:
out+=divdict[key]
if out == "":
out = i
print(out)
if __name__ == "__main__":
mydict = {3:"Fizz",5:"Buzz"}
for i in range(-50,50):
checkdict(mydict, i)