Question: i need help with Codingbat python sum_teens Given a list of integers, return the sum of teens (13-19, inclusive). sum_teens([20, 28]) 0 sum_teens([29, 20, 19,

i need help with Codingbat python

sum_teens

Given a list of integers, return the sum of teens (13-19, inclusive).

sum_teens([20, 28]) 0 sum_teens([29, 20, 19, 15, 6]) 34 sum_teens([18, 22, 10, 13, 17, 20]) 48

greatest_negative

Given a list of int values, return the greatest negative value. If there are no negative values, return zero.

greatest_negative([0, -9, -12, 6, 10, -15, 7]) -9 greatest_negative([-3, -2, 9]) -2 greatest_negative([-10, 8, -9, -15, 1, -4, 7, -1, 13]) -1

balance_point

The "balance point" is point where a list of values array can be split so that the sum of the numbers on one side is equal to the sum of the numbers on the other. (The balance point is included in the "second" sub-list.) Given a non-empty list of ints, return the balance point, or -1, in no balance point exists for the given list.

balance_point([1, 1, 1, 2, 1]) 3 balance_point([2, 1, 1, 2, 1]) -1 balance_point([10, 10]) 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!