+ 1

Fizz buzz project from python

n = int(input()) for x in range(1, n+1, 2): if x % 3 == 0 and x % 5 == 0: print("") elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") else: print(x) The output is correct but I don't know what is the problem plz help me

12th May 2021, 8:14 AM
Vishal Rathod
Vishal Rathod - avatar
8 odpowiedzi
+ 3
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) Just add "2" in the range.
12th May 2021, 8:16 AM
Vishal Rathod
Vishal Rathod - avatar
0
It's right 👍
12th May 2021, 8:16 AM
Vishal Rathod
Vishal Rathod - avatar
0
is this solved, or you still need help?
12th May 2021, 8:45 AM
senz
senz - avatar
0
I think there was a glitch I tried first I was showing I am wrong then I tried again I was write
12th May 2021, 9:03 AM
Vishal Rathod
Vishal Rathod - avatar
0
so u still need help?
12th May 2021, 9:03 AM
senz
senz - avatar
0
No I solved it thanks
12th May 2021, 9:04 AM
Vishal Rathod
Vishal Rathod - avatar
0
oh okay good for you
12th May 2021, 9:04 AM
senz
senz - avatar