0

FizzBuzz problem in Python

n = int(input()) for x in range(1, n, 2): print ("SoloLearn"[(4 if x % 3 else 0):(4 if x % 5 else 9)]or x) does it work?

15th Oct 2021, 5:40 AM
Khomi TAKAYANAGI
Khomi TAKAYANAGI - avatar
2 Answers
+ 2
Yes it works but check the spelling of sololearn. It's SoloLearn
15th Oct 2021, 5:48 AM
A͢J
A͢J - avatar
+ 2
Oops... Thank you!
16th Oct 2021, 3:52 AM
Khomi TAKAYANAGI
Khomi TAKAYANAGI - avatar