I need to write a function that takes two inputs, 'target' (integer) and 'values' (a list of integers), and find which number in 'values' is closest to 'target'. I came up with the following:I need to write a function that takes two input
I need to write a function that takes two inputs, 'target' (integer) and 'values' (a list of integers), and find which number in 'values' is closest to 'target'. I came up with the following:I need to write a function that takes two input