[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>Le Fizzbuzz thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 3

File: let-me-tell-you-about-fizzbuzz.jpg (52KB, 490x490px) Image search: [Google]
let-me-tell-you-about-fizzbuzz.jpg
52KB, 490x490px
I bet you Ranjeets can't even Fizzbuzz in one line.

['Fizzbuzz' if not x%15 else 'Fizz' if not x%3 else 'Buzz' if not x%5 else x for x in range(1,101)]
>>
>>55139254
>write fizzbuzz in (almost) any language
>remove line breaks
>have fizzbuzz in one line
>>
>>55139310
>he doesn't known what a one liner is
Even by your definition, go ahead and write it in Java so that it fits in one line of a 4chan post on a 1080p screen, at default 100% page zoom.
>>
File: 1466184683362.gif (74KB, 592x592px) Image search: [Google]
1466184683362.gif
74KB, 592x592px
>>55139254
That Python "reduce" syntax is disgusting and unreadable.
>>
>>55139395
Feeling uncomfy, Rajesh?
>>
File: 1465785861102.png (750KB, 854x853px) Image search: [Google]
1465785861102.png
750KB, 854x853px
>>
>>55139786
Sick Stockholm Syndrome case, man.
>>
What do you guys do? Sit up all night learning indian names to call each other on /g/?
>>
>>55140490
>still hasn't proven neither being white or able to write the OP request
Ayy Charanjit, how's that underpaid Windows development for the superior white race treating ya?
>>
>>55140693
>>>/pol/
>>
>>55140490
Do you at least know what Stockholm syndrome is?
>>
still shite compared to fizzbuzz of the christ

fuck right off
>>
>>55139254
For(int I = 0;I<100; ++I) (I % 3 == 0) ? (I % 5 == 0) ? puts("Fizzbuzz") : puts("Fizz") : (i % 5 == 0) ? puts("buzz") : printf("%d", I);
>>
>>55139254
>"Let me tell you about Fizzbuzz"
>Doesn't tell me about what Fizzbuzz is
So are you gonna explain it to me or are you just gonna pretend I google botnet it?
>>
print $_%3 ? $_%5 ? $_ : "Buzz" : $_%5 ? "Fizz" :"FizzBuzz" for 1 .. 100


Although, one can do almost everything as "one liner" by excessive use of ternary operator...
>>
>Ranjeets
u wot m8 ? "Ranjeet" isnt even a indian name
this is what i call simply FAIL
>>
A[I]←1+I←(0⍷A)/⍳⍴A←('fizzbuzz' 'fizz' 'buzz' 0)[2⊥¨×(⊂3 5)|¨1+⍳100]

>why do other languages even exist
>>
>>55144993
>why do other languages even exist
>>>>>>>>>>++++++++++>++++++[>++++++++<-]><<<<<<<<<<<<+++++++++[>+++++++++++<-]>+[-<+>]<[->+>+<[->>+<<]>>[->+<<<+>>]>>+++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>>[<<<+>+>>-]<<<[->>>+<<<]+>[<->[-]]<[>>>>>+++++++[>++++++++++<-]>.[-]<+++++++[>+++++++++++++++<-]>.[-]<+++++++++++[>+++++++++++<-]>+..[-]<<<<<<<[-]>-]<>>>>>[-]<[-]<[-]<[-]<[-]<<[->>+<<]>>[->+<<<+>>]>>+++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>>[<<<+>+>>-]<<<[->>>+<<<]+>[<->[-]]<[>>>>>++++++[>+++++++++++<-]>.[-]<+++++++++[>+++++++++++++<-]>.[-]<+++++++++++[>+++++++++++<-]>+..[-]<<<<<<<[-]>-]<[>>>[-]>[-]>[-]<<<<<<[->>>+<<<]>>>[-<+<<+>>>]++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>>>>>>>>>[-<+>]<[<<<<<+<+>>>>>>>+<-]<<<<<[>+>+<<-]>>[<<+>>-]<<>>>>>>[<<<<+>+>>>-]<<<<[>>>>+<<<<-]>[<<->>-]<<[<.>[-]]><<>[-]>[-]>[-]<<<<.<<<[-]]>>>>>[-]<[-]<[-]<[-]<[-]<<<>>>>>>>>>>.<<<<<<<<<<]
>>
what is fizzbuzz?
>sorry for being newfag
>>
>>55145117
Print numbers 1-100 except for multiples of 3 print fizz, multiples of 5 print buzz and multiples of 15 print fizzbuzz
>>
 for (i=0, i++) {if (i%3==0) {var i='fizz';} else if (i%5==5) {var i='buzz';} else if (i%5==0 & i%3==0) {var i='fizzbuzz';}  
>>
>>55139254
>python

Yeah dude, I'm sure your middle school computer lab teacher will be real impressed
>>
for(int x=1; x<100 && ((x%15==0 && std::cout << "Fizzbuzz" << std::endl) || (x%3==0 && std::cout << "Fizz" << std::endl) || (x%5==0 && std::cout << "Buzz" << std::endl) || (std::cout << x << std::endl)); x++);
>>
for ( int i = 1; i <= 100; ++i ) printf ( ( !( i % 15 ) ) ? "Fizzbuzz\n" : ( !( i % 3 ) ) ? "Fizz\n" :  ( !( i % 5 ) ) ? "Buzz\n" : "%i\n", i );
>>
>>55139254
>fizzbuzz
You didn't print the result, you just stored it in a list. Try again

>OP is a faggot
Thread posts: 25
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.