diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
commit | 165c7165bb2184c9c9e0576a074ba4f29052bf8f (patch) | |
tree | 9b86dbbd1d4c39b52bfd7f54cfb13c2354727a53 /robot/en.py | |
parent | 4cdea335b0951e3c12dfb7b906f958d6b5be25c6 (diff) | |
parent | c1bb0d56b2c0482c766d094c65fdf0fd9d1aa0ba (diff) |
Merge branch 'master' of 192.168.15.97:codeq-problems
Conflicts:
python/problems/functions/palindrome/sl.py
python/problems/functions/palindromic_numbers/sl.py
Diffstat (limited to 'robot/en.py')
-rw-r--r-- | robot/en.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/robot/en.py b/robot/en.py index f296516..61314e9 100644 --- a/robot/en.py +++ b/robot/en.py @@ -3,5 +3,47 @@ name = 'Robot' description = 'Introductory Robot course.' + hint = { + 'init':['''<p>In code the robot is represented by mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''], + 'connectMotorLeft':['''<p>Connect the left motor to the robot.</p>''', + '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''], + 'connectMotorRight':['''<p>Connect the right motor to the robot.</p>''', + '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''], + 'moveSteering':['''<p>Synchronize the motors.</p>''', + '''<p>Use move_steering method for synchonization <code>robot.move_steering( ... )</code>.</p>'''], + 'moveSteeringOff':['''<p>Stop the motors.</p>''', + '''<p><code>robot.move_steering( 'off' )</code>.</p>'''], + 'onForSeconds':['''<p>The first argument of <code>robot.move_steering</code> should specify that the motors will run for a certain amount of time.</p>''', + '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''], + 'direction':['''<p>Define the direction of moving; negative/positive values represent a left/right turn.</p>'''], + 'seconds':['''<p>Determine the running time of the motors.</p>'''], + 'connectColorSensor':['''<p>Connect the color sensor to the robot.</p>''', + '''<p><code>robot.connect_sensor( 'color' )</code>.</p>'''], + 'colorSensorMeasure':['''<p>While the robot is moving forward, it should use the color sensor in 'color' mode to recognize the colors.</p>''', + '''<p><code>robot.color_sensor_measure( 'color' )</code>.</p>'''], + 'colorSensorMeasureRLI':['''<p>Use the color sensor in 'reflected_light_intensity' mode.</p>''', + '''<p><code>robot.color_sensor_measure( 'reflected_light_intensity' )</code>.</p>'''], + 'moveTankOn':['''<p>Use the method for separate motor control, to set each motor's power separately.</p>''', + '''<p>The most appropriate for this is <code>robot.move_tank( ... )</code>.</p>''', + '''<p><code>robot.move_tank( 'on', ...)</code></p>'''], + 'lrPower': ['''<p>Set the powers of the left and right motor.</p>''', + '''<p><code>robot.move_tank( 'on', lr_power=[ ... ])</code></p>'''], + 'moveTankOff': ['''Stop the robot.''', + '''<p><code>robot.move_tank( 'off' )</code></p>'''], + 'onForRotations':['''<p>Set the first argument of <code>robot.move_steering</code> method so that the motors will run for the specified number of rotations.</p>''', + '''<p><code>robot.move_steering('on_for_rotations', ... )</code>.</p>'''], + 'rotations':['''<p>Determine the number of rotations; how many turns should the motors do in a meter? Measure the circumference of the wheel and compute the number of rotations per meter.</p>''', + '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, rotations=5 )</code>.</p>'''], + 'no_hint': ['''\ +<p>No hint here!</p> +'''], + + 'system_error': ['''\ +<p><span style="color: red;">System error:</span> [%=message%].</p> +'''], + + 'test_results': ['''\ +<p>Your program passed [%=passed%] / [%=total%] tests.</p> +'''], } |