パイソンに挑戦するぞ!! その2
問題文
(forward(100))
forward(100)
(backward(200))
backward(200)
(left(90))
left(90)
(right(90))
right(90)
(speed(3))
speed(3)
(# robo done)
# robo done
(mp = MotorPair('A','B'))
mp = MotorPair('A','B')
(mp.move(3,'rotations',0,50))
mp.move(3,'rotations',0,50)
(mp.move_tank(3,'rotations',-50,50))
mp.move_tank(3,'rotations',-50,50)
(color = 'red')
color = 'red'
(speed = 50)
speed = 50
(print(100))
print(100)
(print('nezu-bot'))
print('nezu-bot')
(print('robo-nyan'))
print('robo-nyan')
(while num < 3:)
while num < 3:
(count = count + 1)
count = count + 1
(color = get_color())
color = get_color()
(cs = ColorSensor('D'))
cs = ColorSensor('D')
(while true:)
while true:
(mp.start(0,30))
mp.start(0,30)
(mp.stop())
mp.stop()
(while cs.get_color() != 'black':)
while cs.get_color() != 'black':
(fs = ForceSensor('B'))
fs = ForceSensor('B')
(while fs.is_pressed() == false:)
while fs.is_pressed() == false: