Question: please show me step by step in python Task 1 - Create a list with the following contents: [1,2,3,4,5,6,7,8,9,10] - Ask the user to input
Task 1 - Create a list with the following contents: [1,2,3,4,5,6,7,8,9,10] - Ask the user to input an integer between 0 and 9 - Use the isdigit () method to check that the user's input is indeed an integer, and then check that it is between 0 and 9 If so, print the list element at index k, where k is the user-supplied integer - If not, print out something like "Your input was invalid :' '(" - Note: the list should remain unchanged after this task! Task 2 - Using list slices, print out the following subsets of the list from Task 1: - 1 to 6 3 to 7 - Even numbers 9 to 5 (in reverse order) - Note: the list should remain unchanged after this task
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
