Write a function that receives two integers from its calling program and prints the average of the two values. Write additional code that uses this function to print the average of 1 and 2.
Write a function that receives a list of words and returns the sum of the lengths of each word in the list. Write additional code that used this function to print the length for the list ['one', 'two', 'three'].
Write a function that receives a list of numbers and returns the sum of the modified values of each number where the modification computes the square of the number plus one. For example, for the values 1, 2 & 3, the function should return 17 ((1**2 + 1) + (2**2 + 1) + (3**2 + 1)).
def change(my_int, my_float, my_string, my_list, my_tuple, my_dict): my_int = 2 my_float = 2.0 my_string = 'two' my_list[0] = 2 my_tuple[0] = 2 my_dict['one'] = 2 i = 1 f = 1.0 s = 'one' l = [1, 2] t = (1, 2) d = {'one': 1} change(i, f, s, l, t, d) print(i, f, s, l, t, d)