FizzBuzz solutions | Sololearn: Learn to code for FREE!

0

FizzBuzz solutions

Hello I wanted to know how you guys have solved the FizzBuzz here is the Code: https://code.sololearn.com/cA79a6A20a21 I have done this myself but I am curious about how others have solved this since there is no comment to show how people solved.

1/15/2021 1:05:10 PM

Ace

7 Answers

New Answer

+8

n = int(input()) for x in range(1, n,2): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") continue elif x % 3 == 0: print("Solo") continue elif x % 5 == 0: print("Learn") continue else: print(x)

+2

Here is how I did it n= int(input()) for x in range(1,n): if (x>1): if x%2==1: if x%3==0 and x%5==0: print(f"{x}SoloLearn") elif x%3==0: print("Solo") elif x%5==0: print("Learn") else: print(x) else: print(x)

+1

Ace Please share me that FIZZBUZZ question I also want to solve it

+1

Here is the question and the default code: https://code.sololearn.com/cA79a6A20a21 and the project its self: https://www.sololearn.com/learning/eom-project/1073/612 If this was what you asked for otherwise I don't know how else I could share it with you Kiibo

+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) https://code.sololearn.com/cCL4NOO1v75B/?ref=app

+1

♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ Nice oneliner!

0

Ace SpaceBarMönkey S†ʒphʒŋ Have a look on my way 👇👇 https://code.sololearn.com/c2KXBEB92s8w/?ref=app