BIT BY BYTE
Question 1 of 2
4 marks
Write a Python function that takes a list of numbers and returns the highest value.
def highest(nums):\n return max(nums)
def highest(nums):\n highest = 0\n for n in nums:\n if n > highest:\n highest = n\n return highest
Both A and B work for positive numbers; A is simpler. B is safer if the list could contain negative numbers AND might be empty (but still errors on empty).
Neither A nor B works.
Check Answer