Question from the Algorithmics - Fundamentals test

Write a program that sorts waste from 5 possible categories: Plastic, Cardboard & Paper, Food, Metal.

Easy

A sorting center manager wants to develop a program allowing him to automatically sort waste from 5 possible categories:

Plastic: incinerated

Cardboard & Paper : recycled

Food : composted

Metal : sent to another center

Which instruction is the most relevant to set up for this?

Author: JĂ©rĂŽmeStatus: Published(Update)Question passed 218 times
Edit
0
Community Evaluations
developer avatar
Stéphane
30/07/2022
I would prefer use a dictionary/associative array in this case, not a loop or a switch.
developer avatar
Auteur anonyme
05/09/2022
Hi Stéphane, I would do the same but the purpose of this question is to test developers on the difference between loop and switch.