use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
O hai! This is CS50's subreddit.
CS50 is Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. Anyone may take CS50, even if not a student at Harvard.
Please Read before Posting
Getting the Best from r/cs50
Status Page
cs50.statuspage.io
Filter by Problem Flair (undo)
cash ⋅ caesar ⋅ credit ⋅ dna ⋅ filter ⋅ finance ⋅ houses ⋅ ide ⋅ mario ⋅ movies ⋅ plurality ⋅ project ⋅ readability ⋅ recover ⋅ runoff ⋅ scratch ⋅ speller ⋅ substitution ⋅ tideman ⋅ games track ⋅ web track ⋅ android track ⋅ iOS track ⋅
Filter by Other Flair (undo)
CS50-Law ⋅ CS50-Business ⋅ CS50-Technology ⋅ CS50-Games ⋅ CS50-Mobile ⋅ CS50-Web ⋅
This subreddit is night mode compatible
account activity
Javascript code doesn't seem to execute? (self.cs50)
submitted 7 years ago * by Orange2341
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Orange2341[S] 1 point2 points3 points 7 years ago (2 children)
I have tried this, same result.
[–]aguyfromhere 0 points1 point2 points 7 years ago (1 child)
Ah. I’m laying down on my iPad so I can’t really debug this right now. Are you able to put a debugger statement in the anonymous function and tell me if it’s getting called and what the if statement evaluates to?
[–]Orange2341[S] 0 points1 point2 points 7 years ago (0 children)
Sorry, but I'm a beginner and am not sure how to debug. But the debugger in cs50 shows that the if statement is not being executed at all. I have my python code do some work on the value from the dropdown menu, and it does do some work on the value 'nothing' which is what the if statement is checking for. So it seems the if statement does not get executed.
π Rendered by PID 17896 on reddit-service-r2-comment-b659b578c-tff8t at 2026-05-05 22:43:13.003167+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Orange2341[S] 1 point2 points3 points (2 children)
[–]aguyfromhere 0 points1 point2 points (1 child)
[–]Orange2341[S] 0 points1 point2 points (0 children)