3 ms·
"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.
by cglace 14y 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))?
- wodow 14y agoBut of course that is a valid piece of code! "15" completely matches the specification you give.