What is the function of a snowman?
Learn nested loops, Arrays, Lists and functions to build and play with your snowman
It is time of racing between friends on skin kayak. Have the fun and announce the results.
Now it's racing time. The lane numbers are shown in the white cells (to the right). Results are shown in the red, yellow, and blue cells. Red cells will contain the first level winners lane numbers (1st and 2nd rank), while yellow cells will contain the second level lane number (3rd and 4th rank). Finally, blue cells will contain the lane numbers of the last three positions.
It is required to print on screen the results colors list in order of lanes like in the shown case.
yellow,red,blue,blue,red,blue,yellow
Hint: Print the list of lane colors that contains the 7 colors ordered by lane number
Now it is required to print the colors of lanes in results on screen, each lane color in a separate line (separate print) like: yellow, red, blue, blue, red, blue and yellow
Now it is required to print the colors of lanes in results on screen, each lane color is preceded by the lane number like:
1,yellow .. 2,red .. 3,blue .. 4,blue .. 5,red .. 6,blue .. 7,yellow
Hint: Each lane color with its number should be printed in a separate line.
Now it is time to color white cells on the right that contain racing lane numbers. Each lane number should be colored by its results color (1st and 2nd positions in red, 3rd and 4th positions in yellow, rest positions in blue).
Now it is time to do both coloring the lanes and printing results on screen.
Color white cells on the right that contain racing lane numbers. Each lane number should be colored by its results color (1st and 2nd positions in red, 3rd and 4th positions in yellow, rest positions in blue).
In addition to lane coloring, print the colors of lanes in results on screen, each lane color is preceded by the lane number like:
1,yellow .. 2,red .. 3,blue .. 4,blue .. 5,red .. 6,blue .. 7,yellow
Hint: Each lane color with its number should be printed on screen in a separate line.
What is the function of a snowman?
Learn nested loops, Arrays, Lists and functions to build and play with your snowman