Checkpoint 5.39.1.
Create a function called
addition_tup
that takes in parameters lst
and num
and returns a tuple that contains tuples with the first value being a number from the lst
and the second value being the number from the lst
plus num
. Round each value within the tuple to two decimal places. For example, addition_tup([1,2,3], 5)
should return ((1, 6), (2, 7), (3, 8))
and addition_tup([-1,-2, -3, 0, 5], -5.2)
should return ((-1, -6.2), (-2, -7.2), (-3, -8.2), (0, -5.2), (5, -0.2))
.