Write a Python program that perform the following tasks [8 marks]: 1. Create two lists: a....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python program that perform the following tasks [8 marks]: 1. Create two lists: a. L1: 1, 2, 3 b. L2: 7,8,9 2. Append L2 to L1 3. Insert the word "security" at position 1 of L1. 4. Extend L1 by adding two number: 10, 11. NOTE: Please print the list(s) after every step. Sample Run: [1, 2, 3] [7, 8, 9] [1, 2, 3, [7, 8, 9]] [1, 'security', 2, 3, [7, 8, 9]] [1, 'security', 2, 3, [7, 8, 9, 10, 11] Write a Python program that perform the following tasks [8 marks]: 1. Create two lists: a. L1: 1, 2, 3 b. L2: 7,8,9 2. Append L2 to L1 3. Insert the word "security" at position 1 of L1. 4. Extend L1 by adding two number: 10, 11. NOTE: Please print the list(s) after every step. Sample Run: [1, 2, 3] [7, 8, 9] [1, 2, 3, [7, 8, 9]] [1, 'security', 2, 3, [7, 8, 9]] [1, 'security', 2, 3, [7, 8, 9, 10, 11]
Expert Answer:
Answer rating: 100% (QA)
The image contains instructions for writing a Python program that performs a series o... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Two uncharged spheres are separated by 3.50 m. If 2.00 10 12 electrons are removed from one sphere and placed on the other, determine the magnitude of the Coulomb force (in N) on one of the spheres,...
-
SQL database the yellow box is the Order data mentioned in the Q CoursHeroTranscribedText Orders (cust, date, proc, memory, hd, od, quant, price) Exercise 7.4: In Exercise 6.1 we spoke of PC-order...
-
What is meant by indirect control? Give an illustration.
-
Nanjing Ltd. purchased from its shareholders 5,000 shares of its own previously issued shares for 250,000. It later resold 1,300 shares for 54 per share, then 2,000 more shares for 49 per share, and...
-
Flu cases this past flu season (4 months or 20 weeks) in the Butterfield, Kansas, school system were about 1 5 per week. For the entire state, the weekly average was 16 and the standard deviation...
-
The president of Hill Enterprises, Terri Hill, projects the firms aggregate demand requirements over the next 8 months as follows: Her operations manager is considering a new plan, which begins in...
-
Monster Beverage is considering purchasing a new canning machine. This machine costs $3,500,000 up front. Required return = 11.3% What is the present value of all future cash flows? Note: Do not...
-
Suppose that a customer were to purchase from Colonial Originals a furniture kit that has a catalog price of $99.95 and a shipping weight of 26.5 pounds. a. Using Table 3-3, determine the total cost...
-
Analyse the following: (a) Mr Tan, 42, is thinking of upgrading his residence for his family of four. He earns $25,000 monthly as a businessman. There are two properties he is considering; one in...
-
An espresso stand finds that its weekly profit is a function of the price, z, it charges per cup. If z is in dollars, the weekly profit is P(x)=-22002 +8580x - 6645.75 dollars. (a) What is the...
-
Find an explicit solution y(x), by using the given substitution then solving a linear ODE. dy dx SOLUTION: The chain rule gives du dx dy dx dy dx + y = y, y(0) X = X 1 du 3y dx X y=y=, y(1)=2. u= y....
-
Work out the table for p^(QUR) (here, delamine Q or R first, then dop and that result). Q R P PA(QUR) T GOTTIIIIHH TTHETTEF QUR T T T LL F F T T T T F F F TETE FFTTEL Find a similar issue that...
-
A stock pays a dividend that grows at rate g each year. The first dividend, which will be paid in one year, will be D, the next dividend, which will be paid in two years, will be (1+g)D, the third...
-
You have developed a chain of 10 cyber cafes near university campuses like Wits, UCT, UJ, Rhodes and Stellenbosch. Your business concept is to serve Java to the budding revolutionaries, the caviar...
-
12. Use the data in the table to answer the following questions. Assume that call and put options are available in a contract covering 100 shares. STOCK PRICE EXERCISE PRICE EXPIRATION (YEARS) STD....
-
Differentiate. y = ln(3x + 1) ln(5x + 1)
-
Joan is a self-employed attorney in New York City. Joan took a trip to San Diego, CA, primarily for business, to consult with a client and take a short vacation. On the trip, Joan incurred the...
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
Mike sells his home to Jane on April 2, 2012. Jane pays the property taxes covering the full calendar year in October, which amount to $2,500. How much may Mike and Jane each deduct for property...
-
The cement industry is an example of an undifferentiated oligopoly. The automobile industry is a differentiated oligopoly. Which of these two is more likely to advertise? Why?
-
What is the purpose of a brand name? What would occur if any maker of aspirin could put a Bayer Aspirin label on its product?
-
The South American cocaine industry consists of several families that obtain the raw material, refine it, and distribute it in the United States. There are only about three large families, but there...
Study smarter with the SolutionInn App