Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 : Python Warm Up ( must complete ) Problem: Follow the steps below to create a program for Bluebell Greenhouses that prints apurchase

Exercise 1: Python Warm Up (must complete)Problem: Follow the steps below to create a program for Bluebell Greenhouses that prints apurchase receipt. In the process, practice using dictionaries and formatting strings.1. Bluebell Greenhouses sells the following Spring flower bulbs. Create a dictionary that storesthis information. Which data should be the keys (must be unique), and which should be thevalues?Flower Bulb Name Price Per Bulbdaffodil $ 0.35tulip $ 0.33crocus $ 0.25hyacinth $ 0.75bluebell $ 0.502. Mary has a standing order with Bluebell Greenhouses for 50 daffodil bulbs and 100 tulipbulbs every year. Create a new dictionary that stores this information.3. Demand for tulips this year has dramatically outpaced demand. As a result, the price of tulipbulbs has increased by 25%. Update the price of tulip bulbs in the appropriate dictionary.(Round the price per bulb to 2 decimal places.)4. This year, Mary would also like to try planting hyacinths. Add 30 hyacinth bulbs to thedictionary that is storing her order.5. Display Marys purchase order for this year on the screen. Each line should be formatted asfollows:bulb code * number of bulbs = $ subtotalfield width: 5 field width: 4 field width: 6left-aligned right-aligned right-aligned 2 decimal placessingle spacewhere the code for each bulb name is the first three letters of its name, all in capital letters.The lines should be printed so that the bulb codes are in alphabetical order.6. Calculate the total number of bulbs that Mary purchased this year, as well as the total cost ofher order. Include this information at the bottom of her purchase order. Format the total costfloat value so that it is right-aligned in a field width of 6, with 2 decimal places.Exercise 1: Sample OutputYou have purchased the following bulbs:DAF *50= $ 17.50HYA *30= $ 22.50TUL *100= $ 41.00Thank you for purchasing 180 bulbs from Bluebell Greenhouses.Your total comes to $ 81.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Question What are the advantages of a written bonus plan?

Answered: 1 week ago