Write a code to obtain Mean ,Median and Mode from an array list
Implement calculate_statistics(nums), which accepts a non-empty list of integers and returns [mean, median, mode]. Return the mean as a floating-point value, the median as a number, and the smallest value when multiple values share the highest frequency. The input list must not be modified.
def calculate_statistics(nums):