summaryrefslogtreecommitdiff
path: root/robot/problems/introduction/forward/en.py
blob: 5f78d57d0c9b8611aabc1cdfc800fa4ec89e408d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# coding=utf-8

name = 'Forward 3s'
slug = 'Forward 3s'

description = '''\
<p>Write a program that would make the robot drive straight forward for 3 seconds and stop</p>
'''

hint = {
   'mW_init':mod.hint['init'],
   'connectMotorLeft':mod.hint['connectMotorLeft'],
   'connectMotorRight':mod.hint['connectMotorRight'],
   'moveSteering':mod.hint['moveSteering'],
   'onForSeconds':mod.hint['onForSeconds'],
   'direction':mod.hint['direction']+['''<p><code>robot.move_steering( 'on_for_seconds', direction=0, ... )</code>.</p>'''],
   'seconds':mod.hint['seconds']+['''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=3 )</code>.</p>'''],
}

plan = ['''\
<p>The program should:</p>
<ol>
  <li>create a mindstorms_widgets() object, which represents the robot in your code.</li>
  <li>connect the driving motors.</li>
  <li>synchronize the motors and run them so that the robot would move forward for 3 seconds.</li>
</ol>'''
]