Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task: Create a solution that accepts an integer input identifying how many items are to be purchased from a vending machine, followed by an equivalent

image text in transcribed

Task: Create a solution that accepts an integer input identifying how many items are to be purchased from a vending machine, followed by an equivalent number of string inputs representing the vending machine snack selections. The following dictionary snacks lists available snack selections as the key with the cost per selection as the value. snacks ={A1:0.25,A2:0.50,A3:0.75,B1:1.50,B2:1.75,B3:2.00,C1:0.25,C2:0.45,C3:0.30} Dutput the total cost of the purchased snacks to two decimal places. The solution output should be in the format Total price: Scost_of_snacks Sample Input/Output: If the input is then the expected output is Total price: $2.30 Input to program If your code requires input values, provide them here

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions