@emptist I'm not familiar with Python but I believe the "if lvl<0: return false" catches that condition. The moment the counter "lvl" goes negative it will return false.
@TheAbstractMethod He was right, because he checked after each character whether the count was less than zero. In your example, the count would be -1 after the third character and f would return False.
tabs are actually usually automatic in python - you can see him delete the space on-screen; he's just dictating how many tabs are necessary for accuracy's sake.
@MiskatonicSC2 You mean they're automatic in his editor, not python the language. Yes, my vi setup is awesome, as well. My point is python the tabs *have* to be there in python. If I were dictating the same function in ruby, I'd just say "space" and get on with things that matter instead of wondering "wait...how many tabs did I say on that last line?"
@af202020 no, his point is that languages that use white-space indentation to delimit blocks suck.
when it comes to programming languages, all whitespace should be treated the same. Giving different amounts of white-space different meanings, just limits the way you can structure your code.
why are there so many dumb comments saying his code was wrong. it was damn right. and he did it without a screen. damn.
acumen321 1 month ago
@Orbofs: Try doing that without seeing your screen or writing anything down - if you forget your last character, you're done.
If MIT Comp. Sci. students can't do it, it's hard.
PantherTrax 6 months ago
my answer
Orbofs 6 months ago
I solved this in 15 seconds in my head. Is he serious?
Orbofs 6 months ago
Cool :D
john3verse5 10 months ago
The singular of parentheses is parenthesis.
leostein 1 year ago
sorry but "())(" will return true and that is wrong
emptist 1 year ago
@emptist Actually, it would return False on the third run of the for.
Zolovian 1 year ago 2
@emptist I'm not familiar with Python but I believe the "if lvl<0: return false" catches that condition. The moment the counter "lvl" goes negative it will return false.
TheTurboChan 1 year ago
test if I can comment
emptist 1 year ago
This is like playing Singpath.com blind. Very cool.
scboesch 1 year ago
This has been flagged as spam show
*** Ģęţ ą Ƒŗęę įPhǫŋę 4 Ţodąƴ - şeę hǫw ǫŋ ɱy ƥŗǫfiɭę.
jordinkroy 1 year ago
python is the only language i find acceptable, is that bad?
bovinespongiformflu 1 year ago
"return lvl == 0" instead of all "if, else, etc.."
danieLs0xFF 1 year ago 4
@danieLs0xFF Seriously!
codewarrior0 1 year ago
you really don't need the if <0 statement
foggydoggydoo 1 year ago
@foggydoggydoo You actually do. Otherwise, ")(" would return True.
MichaelCiuffo 1 year ago 20
Wow, that guy at the end.
gtincan 1 year ago
I'd be saying. "Whos the dirty hippy playing guitar! I'm trying to code here!"
dannysplace7 1 year ago
the game where the loser gets more pussy
TropicalPickle 1 year ago
@TropicalPickle not at MIT, he don't.
LFZ15 1 year ago
I love how the entire room knows the second guy's is wrong as soon as he says "final answer" and before any test cases are executed. <3
sprrwhwk 1 year ago
@TheAbstractMethod He was right, because he checked after each character whether the count was less than zero. In your example, the count would be -1 after the third character and f would return False.
jshowalter 1 year ago
Comment removed
TheAbstractMethod 1 year ago
@TheAbstractMethod actually no, he checks if the count goes below zero, which it would if there too many closing parentheses
mchampanis 1 year ago
Comment removed
IndigoCZ 1 year ago
HI EVERYBODY!!!!
TheWiiZone 1 year ago 19
@TheWiiZone
Hi. Dr. nick!!!
jjooeejj 1 year ago
@TheWiiZone We were announcing the next event. The video editor is just really good at cutting things off.
flipdogorl 1 year ago
This has been flagged as spam show
@TheWiiZone We were announcing the next event. The video editor is just really good at cutting things off.
flipdogorl 1 year ago
"tab tab tab" fuck that. I'll stick to ruby, thanks.
JofoTubin 1 year ago
@JofoTubin
tabs are actually usually automatic in python - you can see him delete the space on-screen; he's just dictating how many tabs are necessary for accuracy's sake.
MiskatonicSC2 1 year ago
@MiskatonicSC2 You mean they're automatic in his editor, not python the language. Yes, my vi setup is awesome, as well. My point is python the tabs *have* to be there in python. If I were dictating the same function in ruby, I'd just say "space" and get on with things that matter instead of wondering "wait...how many tabs did I say on that last line?"
JofoTubin 1 year ago
@JofoTubin you're picking your programming language based on which one is easier to dictate? Personally I use a keyboard for programming.
af202020 1 year ago
@af202020 no, his point is that languages that use white-space indentation to delimit blocks suck.
when it comes to programming languages, all whitespace should be treated the same. Giving different amounts of white-space different meanings, just limits the way you can structure your code.
cottonvibes 1 year ago
This is just bad form. Where are their comments?
Zizhou 1 year ago 2
This guy doesn't even have a neck beard. Why didn't they type "oh shit"
gbo2k69 1 year ago
This guy doesn't even have a neck beard.
gbo2k69 1 year ago
I NEED SO MUCH MORE OF THIS.
RevalutionDemonKilla 1 year ago
NEEEEEERDS!!!!!!!!!!
ItBurnsSomehow 1 year ago
@ItBurnsSomehow
enjoy bagging groceries
500killer 1 year ago
the only thing more exciting than watching people write code is watching people dictate code!
I kid, I kid
correip 1 year ago
rofl
BrianKamrany 1 year ago
gay
Evilfisher 1 year ago
@Evilfisher as your brain
fukuppppppppp 1 year ago
@Evilfisher You'll be working for these people someday.
bonchbonch 1 year ago
this is so cruel
laofmoonster 1 year ago 8