- 1
FizzBuzz
Please help me with FizzBuzz code
6 Answers
+ 2
Thanks
+ 5
https://code.sololearn.com/ckVF79zQ2SBZ/?ref=app
https://code.sololearn.com/c5S7c9QIpgb8/?ref=app
https://code.sololearn.com/cJ4MRbB3atRb/?ref=app
https://code.sololearn.com/c6Z4ocD1ZaVr/?ref=app
https://code.sololearn.com/clj3N46vIYWZ/?ref=app
https://code.sololearn.com/cnXGiM9gsmY0/?ref=app
https://code.sololearn.com/c2a20a23a187/?ref=app
https://code.sololearn.com/cl3mGAd40tD4/?ref=app
https://code.sololearn.com/cwdDT27u7ayF/?ref=app
https://code.sololearn.com/cxrHEUh9dWUS/?ref=app
https://code.sololearn.com/cA15a17a19a1/?ref=app
https://code.sololearn.com/c2F5O11eBJi6/?ref=app
https://code.sololearn.com/cl93D5gVjV6w/?ref=app
https://code.sololearn.com/c7eB8MZZjV2I/?ref=app
https://code.sololearn.com/c7WlpI7dkyCk/?ref=app
https://code.sololearn.com/cHeB95YTQSlP/?ref=app
https://code.sololearn.com/c2285gflP7Oz/?ref=app
https://code.sololearn.com/cPTJT5qX82dr/?ref=app
https://code.sololearn.com/cnMYBuQ5IdIk/?ref=app
https://code.sololearn.com/cIA95mPSaZpy/?ref=app
https://code.sololearn.com/cA5A21a25A38/?ref
+ 3
_į¢Ē¾įį»¢Č”ĪŬ_
You need to change the code to skip the even numbers, so that the logic only applies to odd numbers in the range.
for x in range(1, n, 2):
+ 2
HonFu hier
+ 1
Please, share your attempt first.
0
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:
continue
Where error?