Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sort the packages using the robotic arm of the factory. Rules You work in an automated factory and your objective is to write the

image

Sort the packages using the robotic arm of the factory. Rules You work in an automated factory and your objective is to write the function that will dispatch the packages to the correct stack, according to their volume and mass. A package is bulky if its volume (Width x Height x Length) is greater than or equal to 1,000,000 cm or when one of its dimension is greater or equal than 150 cm. A package is heavy when its mass is greater or equal than 20 kg. You must dispatch the packages in the following stacks: STANDARD: standard packages (those which are not bulky nor heavy) can be handled normally. SPECIAL: packages that are either heavy or bulky can't be handled automatically. REJECTED: packages that are both heavy and bulky are rejected. Implementation Implement the function solve (width, height, length, mass) (units are centimeter for the dimensions and kilogram for the mass). This function must return a string: the name of the stack where the package should go.

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

Business Communication In Person, In Print, Online

Authors: Amy Newman, Scot Ober

8th edition

1111533164, 978-1111533168

More Books

Students also viewed these Programming questions

Question

BPR always involves automation. Group of answer choices True False

Answered: 1 week ago