my assignment states:

Write a function named assignment2 with three inputs input 1 is a list of lists representing an nxn matrix input 2 is a list representing an nx1 matrix input 3 is a list of strings Your function should complete three tasks:

a. Task 1: use the input function to ask the user for a number, then add 7 to the integer value of the input number and print the result. If the user did not put in a number that can be converted to an integer, ask them for another input

b. Task 2: without using numpy or any built in matrix operation functions, multiply input 1 by input 2. You may assume that all inputs are valid and of the correct structure & size. The result should be a list of length n representing an nx1 matrix. Print out the resulting list.

c. Task 3: make a dictionary with one entry per string in the input list (input 3 in your function). the keys will be "s0", "s1", "s2", ...."sn" where the number is the index of the string in the original list and the values are tuples with the original string as the first value and the number of words in the string as the second value. Your function should return the dictionary from task 3

What I have so far some input would be great

def quiz2(input1, input2, input3): while True:#while loop used to run my calculation try:#try is used to execute my loop num = input("Enter a number: ")#num is a varible used to define a user input with string asking for number num = int(num)#used to convert my varible to integer except ValueError as e:#used when the value is not a nuber print("You did not enter a number.")#print sting stateing you didn't post number continue#goes back to top of loop else:#else used if number is given print(int(num+7))#prints out user input plus seven break#break used to break the loop input1=[[]]#input1 is a variable that assings a list or matix of nxn size input2=[]#input2 is an nx1 matix #define a variable named result that takes input one and multiplys it by input 2 printing the result result = [[sum(a*b for a,b in zip(input1_row,input2_col)) for input2_col in zip(*input2)] for input1_row in input1] for r in result:#for statement used to print my result print(r)#returns new matrix input3 = []#input3 is an empty list to input strings #returnDict returns a dictionary with list postions as keys and the original item and lenth of item as key values returnDict = {'s' + str(index): [item, len(item)] for index, item in enumerate(input3)} return(returnDict)#return used to output dictionary