Question: (python) def roundSum(a,b,c): For this problem, we'll round an int value up to the next multiple of 10 if its rightmost digit is 5 or

(python)
def roundSum(a,b,c): For this problem, we'll round an int value up to the next multiple of 10 if its rightmost digit is 5 or more, so 15 rounds up to 20. Alternately, round down to the previous multiple of 10 if its rightmost digit is less than 5, so 12 rounds down to 10. Given 3 integers, a, b, and c, return the sum of their rounded values. To avoid code repetition, write a separate helper function round10 (num) and call it 3 times. The helper function definition is provided below. pass def round10 (num) : This is where you will write the helper function as described above. pass def makeChocolate(givenSmall, givenBig, goal): We want to make a package of goal kilos of chocolate. We have small bars (1 kilo each) and big bars (5 kilos each). Return the number of small bars to use, assuming we always use big bars before small bars to reach the total goal. Return -1 if goal kilos can't be made with givenSmall small bars and givenBig big bars. You cannot break a big bar into 5 small bars. pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
