programming-examples/python/Math/Find and display decimal numbers in sorted order.py
2019-11-15 12:59:38 +01:00

4 lines
168 B
Python

from decimal import *
data = list(map(Decimal, '2.45 2.69 2.45 3.45 2.00 0.04 7.25'.split()))
print("Sum: ", sum(data))
print("Sorted order: ", sorted(data))