0
Pls help with fizzbuzz challenge
Too hard i have the code ok n = int(input()) for x in range(1, n): 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) #But doesn't work so i tried print(1) print("Solo") print("Learn") print(7) print("Solo") print(11) print(13) Didn'twork also can't hack the hacker
4 Antworten
+ 1
Vlad MDMA
Skip those numbers which are multiple of 2 so do this
for x in range(1, n, 2):
+ 1
Hey there! Create a if statement that checks if a number is divisible by 2 and then add continue under it. Hope it helps ✌
+ 1
Vlad,
Please tag Python as the relevant language rather than 'pls help' ☝
Because your code is in Python.
0
It keeps failing