Task 6 Given a list named my_list. my_list=[10,20,30,40,60,100,2,5] Write a python program that takes the position as an input from the user and prints the element of that position from the list. If the user's input position is not in the range, return an exception stating "Index out of range". Make sure your program always prints "Program ended" at the end, no matter what happens. Hint: Use finally block
Task 6 Given a list named my_list. my_list=[10,20,30,40,60,100,2,5] Write a python program that takes the position as an input from the user and prints the element of that position from the list. If the user's input position is not in the range, return an exception stating "Index out of range". Make sure your program always prints "Program ended" at the end, no matter what happens. Hint: Use finally block
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
Related questions
Question
Must show it in Python:
Please show step by step with comments.
Please show it in simplest form.
Input and Output must match with the Question
Please go through the Question very carefully.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT