Hacker News new | ask | show | jobs
by cglace 4817 days ago
"Your turn now - go on and change the following code to compute the sum of the numbers 1 through 5."

If you input 15 and submit, it says the answer is correct. Do all online code courses just check for the retured value?

How do these services deal with someone running sum(i for i in xrange(1000000000000000000))?

1 comments

But of course that is a valid piece of code!

"15" completely matches the specification you give.