Answered step by step
Verified Expert Solution
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
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
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