Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in python! Create a dictionary to hold the prices of fruit: Bananas cost $1.5 a pound, apples $2.3 a pound, oranges cost $4.5 a

code in python!

  1. Create a dictionary to hold the prices of fruit: Bananas cost $1.5 a pound, apples $2.3 a pound, oranges cost $4.5 a pound and cherries cost $6 a pound.
  2. Create another dictionary to hold the stock of each fruit: You have 35 pounds of bananas, 42 pounds of apples, 40 pounds of oranges and 12 pounds of cherries.

  1. Display the data in a table format as such:

Fruit Price Stock

Banana 1.5 35

Apple 2.3 42

..

  1. Calculate the total value we have of each fruit and the total value of the whole shop.

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

Step: 3

blur-text-image

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions