Define a function stats(nums) that returns a tuple of (minimum, maximum, average)
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Define a function stats(nums) that returns a tuple of (minimum, maximum, average). Unpack the returned tuple into three variables and print each on its own line for nums = [4, 9, 2, 7, 8].
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.