python fizzbazz code example
Example: fizzbuzz python
def minInput():
Min = 1
return(Min)
def maxInput():
Max=100
return(Max)
def creator(i):
item = ""
if task(i,3,"fizz")=="fizz":
item = item+task(i,3,"fizz")
if task(i,5,"buzz")=="buzz":
item = item+task(i,5,"buzz")
if task(i,7,"pezz")=="pezz":
item = item+task(i,7,"pezz")
if item == "":
item = i
return item
def task(i,d,word):
if i%d==0:
return (word)
def main():
Max = maxInput()
Min = minInput()
for i in range(Min,Max):
print(creator(i))
main()