0 out of 464 challenges solved
Write a Python function `big_diff(nums)` that takes a list of integers `nums` as input and returns the difference between the largest and smallest values in the list. #### Example Usage ```python [main.nopy] print(big_diff([1, 2, 3, 4])) # Output: 3 print(big_diff([4, 5, 12])) # Output: 8 print(big_diff([9, 2, 3])) # Output: 7 ``` #### Constraints - The input list will contain at least two integers. - The integers in the list can be positive, negative, or zero.
def big_diff(nums): """ Calculate the difference between the largest and smallest values in a list. Args: nums (list): A list of integers. Returns: int: The difference between the largest and smallest values. """ # Placeholder for the solution pass