Heres a question I got from IT teacher, I have no idea how to answer it :S
A ball-sorting robot sorts balls according to their colour. A line of balls each
either red or blue is initially on a ramp. The robot takes each ball from the
ramp, detects its colour, and then places it into one of two trays – one tray for
the red balls and one for the blue balls. The robot continues sorting balls until
they have all been assigned to the appropriate trays, write a set of instructions for the robot to sort the line of balls, using a repetition structure and a selection structure.
anyone care to help?