Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please show me step by step in pyton Task 1 - Create a list with the following contents: [1,2,3,4,5,6,7,8,9,10] - Ask the user to input
please show me step by step in pyton
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 isdigito 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
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