(arr)
| 1 | # Complete the miniMaxSum function below. |
| 2 | |
| 3 | def miniMaxSum(arr): |
| 4 | a=[] #empty list to add sum of numbers except the number of each element the list |
| 5 | for i in range(len(arr)): |
| 6 | if i==0: #checking for the empty list |
| 7 | a=[sum(arr)-arr[i]] #adding the first element in that empty list |
| 8 | else: |
| 9 | a.append(sum(arr)-arr[i]) #appending the sum for other elements |
| 10 | |
| 11 | print("{} {}".format(min(a),max(a))) #printing the minimum of all the sums and maximum of all the sums |
| 12 | |
| 13 | |
| 14 |
no test coverage detected