Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A bagel shop charges 75 cents per bagel for orders of less than a half-dozen bagels and 60 cents per bagel for orders of a
A bagel shop charges 75 cents per bagel for orders of less than a half-dozen bagels and 60 cents per bagel for orders of a half-dozen or more. For example, if a customer order 2 bagels, the charge is 1.50. If a customer order 7 bagels, the charge is 4.2. Please implement this function, and return the number of the cost.
bagel_cost(0) 'The cost is $0.0' bagel_cost(1) 'The cost is $0.75' bagel_cost(2) 'The cost is $1.5'
Step 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