ICode国际青少年编程竞赛- Python-2级训练场-列表遍历
1、
for i in range(3):Flyer[i].step(2)
Dev.step(6)
2、
for i in range(7):Flyer[i].step()
Dev.step(Item.x - Dev.x)
3、
for i in range(3):Flyer[i].step(1)
Dev.step(4)
Dev.turnLeft()
Dev.step(2)
Dev.turnLeft()
for i in range(3):Flyer[i].step(2)
Dev.step(4)
4、
for i in range(8):Flyer[i].step(2)
Dev.step(2)
Dev.turnRight()
for i in range(3):Dev.step(5)Dev.turnLeft()
Dev.step(-1)
5、
for i in range(8):Flyer[i].step(1)
for i in range(2):Dev.step(6)Dev.turnLeft()
6、
for i in range(12):Flyer[i].step(1)
Dev.step(Dev.y - Item.y)
7、
for i in range(8):Flyer[i].step(3)
for i in range(4):Dev.turnLeft()Dev.step(3)Dev.step(-6)Dev.step(3)Dev.turnRight()Dev.step(4)
8、
for i in range(8):Flyer[i].step(2)
Dev.step(2)
Dev.turnRight()
for i in range(3):Dev.step(5)Dev.turnLeft()
Dev.step(-1)
9、
for i in range(4):Flyer[i].step(1)
Spaceship.step(Spaceship.y - Item[0].y)
10、
for i in range(4):Flyer[i].step(1)
for i in range(3):Dev.turnRight()Dev.step(2)Dev.turnLeft()Dev.step(2)
11、
for i in range(5):Flyer[i].step(2)
for i in range(3):Dev.step(4)Dev.turnRight()
12、
for i in range(3):Flyer[i+1].step(1)
for i in range(3):Dev.step(2)Dev.turnLeft()
13、
for i in range(6):Flyer[i+1].step(1)
Dev.step(Item.x - Dev.x)
14、
for i in range(3):Flyer[i * 2].step(1)
Dev.turnRight()
Dev.step(Item.x - Dev.x)
15、
a = 8
for i in range(4):Flyer[i].step(a)a /= 2
Dev.step(Dev.x - Item.x)
16、
for i in range(3):Flyer[i].step(i + 1)
Dev.step(Item[2].y - Dev.y)
17、
for i in range(2):Flyer[i * 2].step(i * 4 + 1)Dev.step(-2 - i)Dev.turnRight()Flyer[i * 2 + 1].step(i * 4 + 3)Dev.step(-3)Dev.turnLeft()
18、
for i in range(3):Flyer[i + 1].step(i + 1)
Dev.step(Item[4].x - Dev.x)
19、
for i in range(2): Flyer[i * 2].step(2) Dev.step(i + 2) Dev.turnLeft()Flyer[i * 2 + 1].step(2) Dev.step(2 - i) Dev.turnRight()
Dev.step(1)
20、
for i in range(3):Flyer[i].step()
Dev.step(4)Flyer[3].step(3)
Flyer[4].step(3)
Flyer[2].step(2)
Flyer[1].step(2)for i in range(2):Dev.turnRight()Dev.step(2)