Computer Science, asked by bishaldmj888pbolvd, 3 months ago

def fizzBuzz(n):
for i in range(1,n+1):
if i%3==0 and i%5==0:
print("Fizzbuzz")
elif i%3==0 and i%5!=0:
print("Fizz")
elif i%5==0 and i%3!=0:
print("Buzz")
else:
print(i)

if __name__ == '__main__':
n = input('Enter any number:').strip()

fizzBuzz(n)

What is the problem here. Im getting an error that n receives an integer type but string is given?

Answers

Answered by popcorntime4you
1

check this question again

Similar questions