Write a python function shifts and scales all numbers in the given list by the given mean and standard deviation


Topic: Write a python function shifts and scales all numbers in the given list by the given mean and standard deviation

Solution

def shift_and_scale(list_of_nums, mean, std):
    return [ (x-mean) / std for x in list_of_nums ]



List all Python Programs