+ 1
Trouble with "Fizz Buzz"- the last number
When I attempt the fizz Buzz, I'm able to get a correct output, except the last line, which is always "range(,1,n,2)", which is my final line of code, instead of the number. How do I fix this?
4 Answers
+ 6
aryeh friedman ,
please share your code here to get helpful answers from the community.
thanks!
+ 3
aryeh friedman delete the last two lines
+ 2
Thank you!
+ 1
n = int(input())
for x in range(1, n, 2):
if x % 3 == 0 and x % 5 == 0:
print("SoloLearn")
elif x % 3 == 0:
print("Solo")
elif x % 5 == 0:
print("Learn")
else:
print(x)
print(n)
print (range(1, n))