1. Create a dictionary that stores item number, product name, and pricing information for a product...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a dictionary that stores item number, product name, and pricing information for a product of your choosing. Write code that will take the current price, increase it by 30% and store the updated price back into the dictionary. Then print a message that the price of the item has been increased by 30%. Include the name of the product in your message. 2. Create a list of 3 or more dictionary items. Each dictionary item should contain a word and its definition. Make sure each dictionary item is stored in the format discussed in the lecture. Once you have created your list, loop through each item in it and neatly print out each word/definition pair (do not just print the dictionary item directly). 1. Create a dictionary that stores item number, product name, and pricing information for a product of your choosing. Write code that will take the current price, increase it by 30% and store the updated price back into the dictionary. Then print a message that the price of the item has been increased by 30%. Include the name of the product in your message. 2. Create a list of 3 or more dictionary items. Each dictionary item should contain a word and its definition. Make sure each dictionary item is stored in the format discussed in the lecture. Once you have created your list, loop through each item in it and neatly print out each word/definition pair (do not just print the dictionary item directly).
Expert Answer:
Answer rating: 100% (QA)
This little bit of Python code completes both tasks Task 1 Increase price by 30 and update the dictionary productinfo itemnumber 001 productname Coffe... 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
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
In a small country near the Baltic Sea, there are only three commodities: potatoes, meatballs, and jam. Prices have been remarkably stable for the last 50 years or so. Potatoes cost 2 crowns per sack...
-
Write a summary of synthesizing all aspects of the health care issue, through a summary conclusion, concisely of Health Issue Analysis Health Issue Analysis: Part 1 - Obesity and Nutrition Research...
-
Investigation of all five major fires in a western desert during one of the recent summers found the following causes. a. What proportion of those fires were due to arson? b. How many total samples...
-
You push on a crate, and it starts to move-but you don't. Draw a free-body diagram for you and one for the crate; show only the horizontal forces. Then use the diagrams and your knowledge about...
-
Consider the model of Bertrand competition with differentiated products from the text. Let the demand curves for firms A and B be given by Equation 12.10 and Equation 12.11, and let the firms'...
-
How do you anticipate accounting principles to change to ensure optimal patient care through decision making? What impact might accounting principles have on your ability to understand decision...
-
The employees of Custom Clothes work Monday through Friday. Every other Friday the company issues payroll checks totaling $32,000 (or $3,200 per weekday). The current pay period ends on Friday,...
-
You borrow $ 540,000 to buy a house worth $600,000. The interest rate is 2.4 % pa compounding monthly and the fully amortising loan term is 30 years. A loan repayment schedule is shown below, with...
-
How does the molecular friction near the surface affect the flow in the planetary boundary layer? List different types of energy fluxes at an ideal surface, write the surface energy balance equation,...
-
Three companies are selling bonds with the following cash flows. $1,000 at the end of year 5 $100 per year for five years. How much would each of these bonds sell for if the companies credit rating...
-
Supposing that all of the remaining 300 shares were liquidated in December 200B at P100 per share because of bankruptcy of X Corporation. What would be the capital loss in December 200B? Explain...
-
Can you elucidate the molecular basis of epigenetic regulation and its impact on gene expression and cellular differentiation?
-
1. 25 cm of iron (II) sulphate reacts with 24.3 cm Of 0.02M potassium manganate (VII) solution. Calculate the concentration of the iron( sulphate) solution. Mn04 + 8H* + 5FE2* - 5Fe* + 4H20 + Mn2* (3...
-
ABC company leased new advanced computer equipment to STU Ltd on 1 January 2019.STULtd has to pay annual rental of $290,000 starting at 1 January 2019. It is a four years lease with ultimate rental...
-
Steve Jackson (age 51) is a single taxpayer living at 3215 Pacific Dr., Del Mar, CA 92014. His Social Security number is 465-88-9415. In 2012, Steve's earnings and income tax withholding as the...
-
On September 14, 2012, Jay purchased a passenger automobile that is used 75 percent in his accounting business. The automobile has a basis for depreciation purposes of $35,000, and Jay uses the...
-
Ken (age 31) and Amy (age 28) Booth have brought you the following information regarding their income, expenses, and withholding for the year. They are unsure which of these items must be used to...
-
SpeedBurn Ltd manufactures DVD burners and is considering expanding production. A distributor has asked the company to produce a special order of 3000 DVD burners. The burners will be sold using a...
-
A to Z Pty Ltd has provided the following planned perunit cost and sales data for the year ended 30 June 2020. Fixed factory overhead costs are $1 056 000 per year, and the annual fixed selling and...
-
AEK Ltd has prepared its income statement, summarised below, for the year ended 30 June 2019. The company is evaluating three independent situations and has asked for your assistance. Required (a) If...
Study smarter with the SolutionInn App