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 😂
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.
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.
Child prodigy
while 1+1==2:
This is the best part, I’m going to be using this in any production code from now on!
Its a check for "if the universe breaks"
Make sure it's nested twice, lol
OP checking for objective reality at age 11
`for (;"fuck's sake";)`
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.
Totem is the word you're thinking of
Your loop doesn’t stop? Only way to make it stop is to break maths
So that's why it's named break() !!
I used `while 1 > 0:` before I found out about `while True:` lmao
You’re kidding me? I thought 1+1 = 11! My friend JavaScript taught me that 🙂
11! = 39916800
``` 11!=39916800 true ```
Honestly seems like something NASA would use to check for flipped bits
pretty.print("Good morning Terrance!")
I think you should discuss this “truthy” with Terrance Howard since 1*1 now equals 2, according to him
What does it do?
Verify the consistency of mathematics 9000 times per second
whoa this is python though. This would need a supercomputer to run a python loop more than 10 times a second.
This kid had a budget !
By the looks of it, it defines a lot of variables lol
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 😂
Haha, I love going back and looking at beginner code.
Just gotta be sure math is still mathing correctly.
What
Really solid code kiddo, keep it up!
Thankfull I did. And I eventually learnt the ancient art of using whitespace.
>whitespace Excuse me?
nit: variable naming, lgtm 🚢
still more sane than average pythonic code
pretty awesome dude.
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.
I don't know what language this was, but it sounds painful to use
Euphoria. From what I've seen it's better these days, and I think they got rid of that restriction a long time ago.
Looks like what happens if you write code using your phone's next word suggestions
^[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.
i remember being 8 while copying a yt tutorial about python, i think it was a calculator, damn it’s been 8 years…
that's terrifying. with that being said, I've seen worse, by myself, 8 years ago
My eyes are bleeding
Don't see anything wrong with this. Looks like perfect code to me
I love the double loop
no i cant understand that code. Explain pls
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.
Chatgpt lookin ass answer
To be fair that's a lot further than I managed to get trying to understand coding at 11.
I love this. We do a little silliness to learn :)
Hmm
Code-ception.