def getHighest(sales):
sales.sort(reverse=True)
return sales[:3]
print(getHighest([24.15, 120.01, 4.50, 78.13, 29.99])) # [120.01, 78.13, 29.99]
print(getHighest([50.00, 20.00, 30.00, 40.00, 10.00])) # [50.00, 40.00, 30.00]
print(getHighest([100.00, 200.00, 300.00, 400.00, 500.00])) # [500.00, 400.00, 300.00]
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
def getHighest(sales):
sales.sort(reverse=True)
return sales[:3]
print(getHighest([24.15, 120.01, 4.50, 78.13, 29.99])) # [120.01, 78.13, 29.99]
print(getHighest([50.00, 20.00, 30.00, 40.00, 10.00])) # [50.00, 40.00, 30.00]
print(getHighest([100.00, 200.00, 300.00, 400.00, 500.00])) # [500.00, 400.00, 300.00]