Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please. Exercises: 1. Write a function imageCost() that takes user input and calculates the total cost for printing photos. Your function should prompt
in python please.
Exercises: 1. Write a function imageCost() that takes user input and calculates the total cost for printing photos. Your function should prompt for a name and a quantity. The quantity given is the number of photos a user wants to print. For this problem, we will assume printing 1 photo costs $0.50 (50 cents). Your function should calculate the total cost to print all photos and return a message. The following shows how the imageCost() function would be used and what it should display for several test cases. Test all examples. For full points, your output should match the output in the test cases below Python 3.6.3 Shell >>>imageCostO Name: Brenda Quantity: 1 Brenda, the cost for 1 photo(s) is $0.5' >>>imageCostO Name: Brenda Quantity: 0 Brenda, the cost for 0 photo(s) is $0.0' >>>imageCostO Name: Mushi Quantity: 55 Mushi, the cost for 55 photo(s) is $27.5" Ln: 85 Col: 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started