by jakubw · 14y ago · 0 comments
x = [1, 5, 3, 2, 6, 4]
x.sort()
print x
Output: [1, 3, 2, 4, 5, 6]
Not to mention the incomplete standard library. I'm not sure what is the interpreter they're using but it's actually not that hard to sandbox the CPython one and disable certain functions/modules if necessary. def pyChallenge():
print sum(s for s in range(1000) if s % 7 != 0 and s % 5 != 0)
pyChallenge()
Produces a TypeError, and using xrange produces a NameError (Python 3?). I have no idea what they're trying, but it doesn't work. function jsChallenge() {
return 1;
return 2;
return 3;
}
Returns 3 NameError: name 'reduce' is not definedI'm not sure what it is, but I know I don't like "guess which subset of the language you get" being harder than actually solving the algorithms challenges.