#function make_list will #create a list of integers #the size of the list is unknown #from the beginning and it will be defined #the the user choice def make_list(): num_list=[] again='y' while (again=='y'): num=int(input("enter number ")) num_list.append(num) print("do you want to add another num ?") again=input("enter y or n to continue or stop ") return num_list def main(): my_list=make_list() print(my_list) #will ask user to enter the num #if the num in the list #find the index #otherwise - print error #reverse list my_list.reverse() print("reverse list is ") print(my_list) #sorted list print("sorted list is ") my_list.sort() print(my_list) #sorted in decreasing order my_list.reverse() print("decreased list is ") print(my_list) #copy the list (with one memory location) copy_list=my_list print("copy of the list ") print(copy_list) my_list[0]=100 print(my_list) print(copy_list) num_to_look=int(input("enter num ")) if (num_to_look in my_list): item_index=my_list.index(num_to_look) print("index is ", item_index) else: print("item is not in the list") main()