I need to have a dictionary created by what the user inputs. I then need to allow them to input a name and time length which I have managed successfully. I also think I got it to tell me the shortest and longest length correctly. However, for some reason it won't let me calculate an average. I have spent hours researching it on youtube and trying different things, so my hypothesis is that something is incorrect at the top of my code which isn't allowing the calculation of an average.
n = int(input())
my_dict = {}
for i in range(n):
titles=input("What is the ")
length=input("What is length?")
my_dict[titles] = length
print ("You have", n," on your. The names of your are:", my_dict)
shortest = min(my_dict.values())
longest = max(my_dict.values())
print("Your shortest video is", shortest,"minutes long.")
print("Your longest video is", longest,"minutes long.")
average = sum(my_dict.values())/ len(v)
print("Your average length is", average)