[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]

For someone who has never coded, how hard is fizzbuzz?

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: 49
Thread images: 2

File: water-temple1.jpg (38KB, 620x465px) Image search: [Google]
water-temple1.jpg
38KB, 620x465px
For someone who has never coded, how hard is fizzbuzz?
>>
>>59610585
MAN FUCK THAT TEMPLE
>>
>>59610585
>learn if statements
>learn %
>you're now qualified for fizzbuzz
>you now know why everyone laughs at people who can't fizzbuzz
>>
File: great-bay-temple-interior_orig.png (648KB, 1100x618px) Image search: [Google]
great-bay-temple-interior_orig.png
648KB, 1100x618px
>>59610608
Modern day solution is gameshark code to bind L to iron boots or something

3DS remake had iron boots as a C button item. they knew they fucked up.

Also great bay temple is harder and more annoying either way.
>>
>>59610585
obviously you aren't going to just pull it out your ass with 0 expirence?
but all you need to learn is a few very basic things.
>>
>>59610585
About as complicated as remembering which peddels do what in a car. It is absolute basics.
>>
>>59610661
I loved this temple, whooshing around through the pipes was so much fun, and the final boss was terrifying
>>
I can teach you how to code it in less than an hour.
>>
>>59610585
If you completed the second grade, you can fizzbuzz.
>>
>>59610585
If you know the absolute basics of control structures, you can do it easy.
>>
>>59611060
This, you may not know any languages but if you can't write it out in sudo-code you're probably retarded!
>>
>>59610585
Just kill yourself
>>
>>59611083
>sudo-code
>>
>>59610585
It's literally:

If this, do X
If that, do Y
If both this and that then do XY

From experience most people only get trouble with it because they're shit at maths.
>>
>>59610613
>learn %
Why? You don't need modulo for fizzbuzz.
>>
>>59611456
>If both this and that
You failed fizzbuzz.
>>
>>59610585
https://codeshare.io/aJ7vZy
Here is how hard it is.
>>
>>59611083
>tripfag
>sudo-code
>>
>>59610585
easier than water temple if you can read.
>>
>>59611487
Yeah but that's the easiest most intuitive, and most readable way of doing it
>>
>>59610585
EH REH
>>
>>59611487
Literally the easiest fucking method is using modulo. If you can do it in a more complex way (why would you) you can do it with modulo.
>>
>>59610585
It's not hard, just mostly a trick. But not really a trick either, you should know how an if statement works
>>
>>59612146
>>59612777
But then what's there to "learn"? You learn remainder with basic arithmetic, e.g. during primary school.
>>
>>59611487

Where did he say it was the only approach?
>>
>>59612816
There's nothing to learn. Wtf are you talking about? FizzBuzz was designed to weed out people applying for programming jobs that literally couldn't program FizzBuzz, or "senior engineers" who took 20 minutes to do so. Just look it up, the guy who coined the term for programming use wrote about it.
>>
>>59612816

>But then what's there to "learn"?

learn how to put % into an if statement, where do you learn to do that in primary school?

Also why are you being so obviously difficult?
>>
>>59610661
did the 3ds version fix the old bugs of old (the kind speedrunners use)
>>
>>59610585
One week of programming, cycles, conditions, printing, logic operators and mod operator.
>>
>>59611538
I think it's a pun
>>
if you dont understand everything in this code ur worse than fizzbuzz
const 
s=(a,b)=>(b)?s(a^b,(a&b)<<1):a,
f=a=>((a=s(a,1))>100)?process.exit(0):(console.log(((d(a,3)?'':'Fizz')+(d(a,5)?'':'Buzz')||a)),f(a)),
d=(a,b)=>(a==b)?0:(b<a)?d(s(a,s(~b,1)),b):a
f(!f)
>>
if (divisible by 3 and 5) print fizzbuzz // or divisible by 15 because 3 and 5 are divisible by 15)
else if (divisible by 3) print fizz
else if (divisible by 5) print buzz
else print number

I don't know what is so difficult about this?
>>
>>59612984
It's not difficult at all, that's the point.
>>
>>59612984
>I don't know what is so difficult about this?
It's not difficult, but you still managed to fail.
>>
>>59613074
what's wrong with that?
>>
>>59613083
Maybe >>59613074 is nitpicking because the dude forgot to declare a variable and increment it? Who fucking knows, that's the solution in layman's terms.
>>
>>59610608
That temple is easy.
>>
>>59613083
The question specifically states to write it in any language, not pseudocode
>>
>>59613083
>>59613122
If you have an if statement that checks if the number is divisible by both 3 and 5, you fucked up.
>>
>>59613267
I noted that for laymans terms. You obviously should check "if (num % 15)" instead.
>>
>>59613285
That's still a fail. I know the program will generate the correct output, but it's piss poor programming.
>>
>>59610585
easy as fuck, it's nothing hard like people make it seem, I did it by myself in basic 20 years ago before it was called that
>>
>>59610585
Trivial. It's a very simple question, meant to test if you're capable of basic programming tasks. Very basic. If you get asked it in an interview, it's not an insult, it's just that they're making sure you can code at any level at all. if you get all flustered, or can't even begin to do it, you can't code. Pure and simple.
>>
>>59610608
It's easy as fuck, just boring to deal with the boots
>>
>>59613267
not really. just not optimized.
>>
>>59613122
>>59610661
It's not that difficult but it's very long to achieve.
And fuck this shadow
>>
fizzbuzz is easy

with Ada.Text_IO;
use Ada.Text_IO;

procedure fizzbuzz is
fizz : Integer;
buzz : Integer;
begin
fizz := 3;
buzz := 5;
for i in 1..100 loop
fizz := fizz - 1;
buzz := buzz - 1;
put(i'Img & " ");
if(fizz = 0) then
put("Fizz");
fizz := 3;
end if;
if(buzz = 0) then
put("Buzz");
buzz := 5;
end if;
New_Line;
end loop;
end fizzbuzz;


or with mod and dynamic predicates

with Ada.Text_IO;
use Ada.Text_IO;

procedure fizzbuzz is
subtype fizz is Integer with Dynamic_Predicate => fizz mod 3 = 0;
subtype buzz is Integer with Dynamic_Predicate => buzz mod 5 = 0;
begin
for i in 1..100 loop
put(i'Img & " ");
if(i in fizz) then
put("Fizz");
end if;
if(i in buzz) then
put("Buzz");
end if;
New_Line;
end loop;
end fizzbuzz;
>>
>>59612861
It fixed a bunch of them, but it also introduced some new pretty neat ones like death-hole wrong warp, and using restricted items anywhere.

The N64 version is still the best for speedrunning, but you can have a lot of fun breaking your game on the 3DS too.
>>
>>59611487
You don't, but it's the easiest way. And if you're purposefully making code harder to write then you should realise that the hardest syntax to use is bullet to brain so use that one first.
Thread posts: 49
Thread images: 2


[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.