Write a program that fetches the first count amount of elements of a list. (Python)
Webull - Commons Free Stock Cading online porn Working with Lists Scenario 93 Write a program that fetches the first count amount of elements of a list. Aim Create a script that contains the array [34, 9, 32, 91, 58, 13, 77, 21, 56). The script will take a user input count that defines the number of elements to fetch from an array and then outputs those elements. Steps for Completion 1. Go to your main.py file. 2. On the first line, create the following array: nunbers = [34, 9, 32, 91, 58, 13, 77, 21, 56] 3. Next, print the array nunbers and fetch the user input count for the number of elements to fetch from the array 4. Finally, print out the slice of the array from the first element to the nth element. 5. Then, run the script by using the python3 main.py command The output should look like Figure 2.12 shown below. > Terminal 3 workspace s python Ratn.my Numbers 134, 9, 32, 91. se. 13, 77, 21, 561 Number of elements to fetch fron array: 4 134.912 911 4. Finally, print out the slice of the array from the first element to the nth element 5. Then, run the script by using the python3 main.py command The output should look like Figure 2.12 shown below: >- Terminal + workspace $ python3 nain.py Numbers: [34, 9, 32, 91, 58, 13, 77, 21, 56) Number of clenents to fetch fron array: 4 [34, 9, 32, 91] workspace $ python3 main.py Numbers: [34, 9, 32, 91, 58, 13, 77, 21, 56) Number of elenents to fetch fron array: 9 [34, 9, 32, 91, 58, 13, 77, 21, 56) workspace $ python3 nain.py Numbers: [34, 9, 32, 91, 58, 13, 77, 21, 56) Number of clenents to fetch fron array: 1 [34] workspace $ Figure 2.12 Grading Complete each task listed below. Each task contains automated checks which are used to calculate your grade. When you have completed each task by clicking the checkbox, open the task list panel on the left navigation bar and click the "Submit button. Task Follow the instructions and write a program that fetches the first count amount of elements of a list