3 ms·
Their interpreter seems to be broken. eg. for http://codingbat.com/prob/p126968 http://codingbat.com/prob/p126968 the following solution seems ok: def cent
by anthonyb 16y ago
Their interpreter seems to be broken. eg. for http://codingbat.com/prob/p126968 http://codingbat.com/prob/p126968 the following solution seems ok:
def centered_average(nums):
sum(nums[1:-1]) // (len(nums) - 2)
but gives me an error: 'sum is not defined'.
Also, all of their examples use two spaces, not four (the python standard)