Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 2 . 3 1 . Packing Donuts Hermione works at a donut shop and is helping put fresh glazed donuts into a delivery van

HW2.31. Packing Donuts
Hermione works at a donut shop and is helping put fresh glazed donuts into a delivery van for a customer. The customer requires that each box has exactly 12 donuts. Hermione knows that one crate holds 15 boxes of donuts. Your goal is to print how many boxes and crates she needs to pack as many of 823 donuts as she can to meet the customer's requirements. Also print how many donuts will be left unpacked.
Assume that the program starts with the following code:
import math
donuts =823
Note: import math imports a standard math library into Python which can do many mathematical operations. For this problem, you need to understand the math. ceil function which takes the ceiling of a number. A few examples are shown below.
a= math.ceil (2.2)
print(a)??# prints 3
b= math.ceil(32)
print(b)??# prints 2
c= math.ceil(10)
print(c)??# prints 10
Construct a program by dragging & dropping code blocks. Please choose 1 code block from each section.
image text in transcribed

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 Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago