Question
Write a code in phyton for PART 2. Part 1: Enter the titles for the videos in your channel Assume your channel is empty. Write
Write a code in phyton for PART 2.
Part 1: Enter the titles for the videos in your channel Assume your channel is empty.
Write code to allow the user to enter the titles of the videos to be added to the channel.
The user should be able to add as many as they want to.
Then print the titles in the channel so that you can see all of them at once.
Part 2: Set a length for your videos, and run some computations For each video, ask the user to give you a length in minutes for that video. Videos are measured in minutes, and these can have decimal components (like 3.5 minutes). Once the user has entered a length for each video, compute and show them the length of the shortest video, the length of the longest video, and the average video length. Your channel is very particular, so you want the average length to be displayed with exactly 3 decimal points of precision.
Type a code for part 2 in phyton
\# Empty list to store the video titles videos =[] \# Continuously ask the user for video titles until they stop while True: title = input("Enter the title of the video (or type ' q ' to quit): ") if title == 'q': break videos.append(title) \#rint the titles in the channel print("\TTitles in the channel:") for title in videos: print(title)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started