Question: Write a program which performs the following tasks: (1) create a list named num 1 and initialize it with the following values: 'yes', 20, 30,

 Write a program which performs the following tasks: (1) create a

Write a program which performs the following tasks: (1) create a list named num 1 and initialize it with the following values: 'yes', 20, 30, 40, 50, 'no' (2) modify the first element to 10 using the corresponding positive index, and modify the last element to 60 using the corresponding negative index. Print the modified list num1. (3) create another list named num 2 which has three elements 70,80,90. Then, concatenate num 2 to the back of num 1 , so that num 1 is extended. Print the extended list num1. [Run your program in Python IDLE to get rid of syntax errors and verify if the program works correctly as described above. Program that cannot run due to syntax error(s) will receive 0 point.] The original list is ['yes', 20, 30, 40, 50, 'no'] The modified list is [10,20,30,40,50,60] The extended list is [10,20,30,40,50,60,70,80,90]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!