+ 1
Can someone help me in the "Fizz Buzz" code in python
I tried so many time with this code " n = int(input()) for i in range(1,n): if i%3==0 and i%5==0: n[i]=("sololearn") elif i%5==0: n[i]=("learn") elif i%3==0: n[i]=("solo") else: print(i) " but it's not working
2 Answers
+ 14
"n" is an integer and here "n[i]" you treat "n" like an array.
Replace every "n[i]=" with "print" and everything will work.
+ 1
Thnks mate ^^



