Question: Write a function sumWithoutSmallest that computes the sum of a list of values, except for the smallest one, in a single loop. In the loop,

 Write a function sumWithoutSmallest that computes the sum of a list

Write a function sumWithoutSmallest that computes the sum of a list of values, except for the smallest one, in a single loop. In the loop, update the sum and the smallest value. After the loop, subtract the smallest value form the sum and return the difference. You don't need to use the input) to allow the user to provide a set of values. Just create a sequence of values in the first beginning and save it as a lisi. Assuming that I created a list saving [1,2,3,4,5,6,7,8,9,10]. Then, my example output for this list will be the following: The sum without the smallest is 54

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!