Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Example 1: The user subscribes to 2 items Console our. t: Food items available for subscription {pricefweek} IE Apples $5.41] Mixed Vegetables Pack 1kg $9.32

image text in transcribedimage text in transcribedimage text in transcribed
Example 1: The user subscribes to 2 items Console our. t: Food items available for subscription {pricefweek} IE Apples $5.41] Mixed Vegetables Pack 1kg $9.32 Yakult 5 in a pack $3.21] Mixed nuts 500g $15.93 Milk Powder 2Dg $9.4? Roasted Chicken Breast 1kg $3.56 Add \"6 Lavlpples'1 to subscription? {YIN}: I "Mixed Vegetables Pack 1kg" to subscription? {YIN}: H "Yakult 5 in a pack" to subscription? {YIN}: H hMixed Nuts 500g\" to subscription? {YIN}: "Milk Powder EUUQ" to subscription? {YIN}: I "Roasted Chicken Breast 1kg" to subscription? {YIN}: H Your selection: - s Apples {$5.40} Milk Powder 2309* {$9.41} Total cost $14.3? Example 2: User did not subscribe to any items Console on u at Food items available for subscription {pricefweek} IE Apples $5.41] Mixed Vegetables Pack 1kg $9.32 Iakult 5 in a pack $3.2 Mixed nuts 500g $15.93 Milk Powder 2004; $9.4"! Roasted Chicken Breast 1kg $3.55 Add \"6 Apples\" to subscription? {YEN}: n "Mixed Vegetables Pack 1kg" to subscription? {YEN}: H Add hEakult 5 in a pack\" to subscription? {YIN}: H Add "Mixed Nuts g" to subscription? {YIN}: H Add "Milk Powder 200g" to subscription? {YIN}: H Add "Roasted Chicken Breast 1kg" to subscription? {YIN}: n Your selection: - None Total cost $0.UD - Detailed description With the help of a dictionary. the function must display.r the six heallityr food items {6 Apples, Mixed 1|Integetables Pack 1kg, Yakult 5 in a pack, Mixed nuts 590g, Milk Powder EDUg, Roasted Chicken Breast lngavailable for subscription. Take subscription orders 'mn user inputs. Your program should work exactly as the following examples. The text in bold indicates user input. There is a space after the colon symbols. The rst oolurnn, containing the names of the food items. is left- aligned and 41 characters in width The second column is rightaligned and 9 characters in width. The bullets in the list of selection is a space. a hyphen and a space. i.e. " - " Finallyr displayr the total cost. Take note of and implement the newlines between each section of text as shown in the examples. 1You may:r assume the inputs are of letters 11 and 3', of lower and uppercase

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions