Write the definition of a function zero_ending(scores) to add all those values in the list of scores, which are ending with zero and display the sum.
For example: If the scores contain [200, 456, 300, 100, 234, 678] The sum should be displayed as 600
Source Code
def zero_ending(scores):
total = 0
for number in scores:
if number%10 == 0:
total += number
return total
scores = [200, 456, 300, 100, 234, 678]
s = zero_ending(scores)
print(s)
Output
600