Question: Question 6: Running Tally (4 points) Write a function RunningTally that takes in two integers: start and end. The function should go through the numbers

 Question 6: Running Tally (4 points) Write a function RunningTally that

Question 6: Running Tally (4 points) Write a function RunningTally that takes in two integers: start and end. The function should go through the numbers in the range specified by the start and end. If the number is even then add it to a running tally, if the number is odd then subtract half of the number from the tally. If the range of integers given is invalid, return zero from this function. Figuring out what an "invalid range" means in this context is part of the test. ]: def RunningTally(start, end): return # YOUR CODE HERE raise NotImplementedError() == ]: print("Test case 1 : RunningTally(10,3) print("Test case 2: abs(RunningTally(20,60) - 440.0)

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!