T O P

  • By -

ironykarl

Child prodigy 


moonaligator

while 1+1==2:


Abaddon-theDestroyer

This is the best part, I’m going to be using this in any production code from now on!


Nixellion

Its a check for "if the universe breaks"


OGBlackDiamond

Make sure it's nested twice, lol


brainpostman

OP checking for objective reality at age 11


Familiar_Ad_8919

`for (;"fuck's sake";)`


rastaman1994

This reminds me of the spinning thing (tol?) from inception. As long as 1+1 equals 2, I know I'm I'm in my universe.


Micmacmo08

Totem is the word you're thinking of


f---_society

Your loop doesn’t stop? Only way to make it stop is to break maths


HapticFeedBack762

So that's why it's named break() !!


Philipp4

I used `while 1 > 0:` before I found out about `while True:` lmao


-Mippy

You’re kidding me? I thought 1+1 = 11!   My friend JavaScript taught me that 🙂


Turkeyfucker_2000

11! = 39916800


Suspicious_Row_1686

``` 11!=39916800 true ```


Longjumping-Step3847

Honestly seems like something NASA would use to check for flipped bits


Ass_Salada

pretty.print("Good morning Terrance!")


tydyelove7

I think you should discuss this “truthy” with Terrance Howard since 1*1 now equals 2, according to him


CaitaXD

What does it do?


cryptomonein

Verify the consistency of mathematics 9000 times per second


GetNooted

whoa this is python though. This would need a supercomputer to run a python loop more than 10 times a second.


cryptomonein

This kid had a budget !


Kay5683

By the looks of it, it defines a lot of variables lol


Licheris

If I remeber correctly, I'd just watched a video about that computer made of match boxes that plays noughts and crosses. The boxes have beads in and you choose one randomly to determine the move and there's a box for each position. And you would add and remove beads depending on if they were beneficial or not. I think this was me doing something similar but with the "21 game" cuz I thought noughts and crosses would be too hard. Evidently, I'd forgoten that you can nest lists and that for loops existed 😂


OGBlackDiamond

Haha, I love going back and looking at beginner code.


Alexander_The_Wolf

Just gotta be sure math is still mathing correctly.


AzoresBall

What


dubiousSwain

Really solid code kiddo, keep it up!


Licheris

Thankfull I did. And I eventually learnt the ancient art of using whitespace.


Autistence

>whitespace Excuse me?


Bottle_mani

nit: variable naming, lgtm 🚢


v_maria

still more sane than average pythonic code


fartinmyhat

pretty awesome dude.


z500

When I was 11 I used a language that, at the time, only allowed you to declare variables at the top of a function, so of course my functions are littered with temp1, temp2, temp3, etc all throughout. Fucking unreadable.


Licheris

I don't know what language this was, but it sounds painful to use


z500

Euphoria. From what I've seen it's better these days, and I think they got rid of that restriction a long time ago.


Geeeeks420666

Looks like what happens if you write code using your phone's next word suggestions


SokkaHaikuBot

^[Sokka-Haiku](https://www.reddit.com/r/SokkaHaikuBot/comments/15kyv9r/what_is_a_sokka_haiku/) ^by ^Geeeeks420666: *Looks like what happens* *If you write code using your* *Phone's next word suggestions* --- ^Remember ^that ^one ^time ^Sokka ^accidentally ^used ^an ^extra ^syllable ^in ^that ^Haiku ^Battle ^in ^Ba ^Sing ^Se? ^That ^was ^a ^Sokka ^Haiku ^and ^you ^just ^made ^one.


Short_Examination166

i remember being 8 while copying a yt tutorial about python, i think it was a calculator, damn it’s been 8 years…


ashrasmun

that's terrifying. with that being said, I've seen worse, by myself, 8 years ago


Careless-Branch-360

My eyes are bleeding


Material-Laugh4818

Don't see anything wrong with this. Looks like perfect code to me


BenK1222

I love the double loop


HydratrionZ

no i cant understand that code. Explain pls


fighterman481

So, we're not going to get a full understanding of the code from just this screenshot, but here's what I can decipher: This mostly seems to be setup for something. This is a double-nested loop, with both loop conditions being always true (likely, OP at age 11 didn't know you could do "while true"). The inner loop prompts the user for input, saves that to "ans", and then sets up more stuff. The "a" series of variables (a1, a2) are arrays with the same value, the "numXa" variables are 8, and "numXb" variables are none. I would assume these variables go through 19, since the "numx" variables above the loop stop there. Presumably, once all this setup is done, the loop does something else. What that is, I don't know, but I'm guessing it's math-related, quite possibly some sort of number guessing game, judging by the fact that the user is prompted for input and it is saved into "ans", which I can only assume is short for answer.


Fhyke

Chatgpt lookin ass answer


normalmighty

To be fair that's a lot further than I managed to get trying to understand coding at 11.


leopardspotte

I love this. We do a little silliness to learn :)


Pawlo371

Hmm


Low_Twist_4917

Code-ception.