Answered step by step
Verified Expert Solution
Link Copied!

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

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_2

Step: 3

blur-text-image_3

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

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

=+2. What are the criteria for determining its quality?

Answered: 1 week ago