编码 冒险5:运输时间到了

精通 Python

熟悉 Python 的数组和函数。

免费加入

描述

跟朋友一起划艇(skin kayak)比赛的时间到了。玩得开心,记得宣布比赛结果哦。

预览视频

任务

现在开始

现在,开始运输吧!每个赛道都有一个速度。矿车的赛道编号显示在白色单元格中(右侧),结果会显示在红色,黄色和蓝色单元格中。红色单元格将包括一级赛道编号(第1名和第2名),而黄色单元格将包含二级赛道编号(第3名和第4名)。最后,蓝色单元格将包含后三名的三个赛道号。按赛道的颜色顺序在屏幕上打印结果,如下所示:黄色,红色,蓝色,蓝色,红色,蓝色,黄色。提示:打印的赛道颜色列表应包含7个颜色,这些颜色是根据赛道编号排序的。

赛道比赛结果

现在,需要在屏幕上给赛道编号打印相应的颜色。在不同的线上打印每个赛道的颜色如下:黄色、红色、蓝色、蓝色、红色、蓝色、黄色。

赛道速度颜色和编号

现在,需要在屏幕上打印带编号的赛道颜色,每个赛道颜色的前面标有赛道号,如下所示:1黄色、2红色、3蓝色、4蓝色、5红色、7蓝色、7黄色。

Lane color results

Robo has to color in the white cells based on the color results from the race. Each lane should be colored by its position. Red for 1st and 2nd place, yellow for 3rd and 4th place, and the rest are in blue.

着色赛道并打印结果

For this mission, we have to color in the lanes and print the results onto the screen. You have to color in the  white cells based on the result colors. 1st and 2nd in red, 3rd and 4th in yellow, and the rest are in blue.  

Robo also has to print the lane number along with the color results onto the screen.

精通 Python

熟悉 Python 的数组和函数。

免费加入
Got an invite