Question: Written in Python: The bakery shop sells 3 types of pies. Apple pies cost $ 3 each Cherry pies cost $ 4 each Peach pies
Written in Python:
The bakery shop sells types of pies.
Apple pies cost $ each
Cherry pies cost $ each
Peach pies cost $ each
And this is how many they sold in days:
For example, the value of sales for Monday is calculated this way:
Apple pie value Cherry pie value Peach pie value
$xx$xx$xx$
And for Tuesday: $ $ $ $
And for Wednesday: $xx$xx$xx$
And for Thursday: $xx$xx$xx$
You need to have two lists:
one onedimensional and
Define matrix price as a onedimensional array
price # onedimensional list, unit in $ for Apple, Cherry, and
Peach pie
one twodimensional
Define matrix pie x each column represents a day, MondayThursday
pie
# st row for Apple
# nd row for Cherry
# rd row for Peach
As shown above, you may call the onedimensional list price and the twodimensional list pie.
The final resultoutput can be in a form list such as
Or
Mon Tue Wed Thu
$ $ $ $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
