diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-10-14 18:08:44 +0200 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-10-14 18:08:44 +0200 |
commit | 531bde7a2fe3d643e9b6ffe690405b6cc07c4964 (patch) | |
tree | 9fcdd54ec25cacc32cd5aaacfb731c174278fab8 /robot/problems/introduction/forward1m/sl.py | |
parent | 1b936a961e39b2a71b5a773776474446f0c58447 (diff) | |
parent | b1deb24a05a380450ed9dc77c3155a16bd204dfc (diff) |
Merge branch 'master' of 192.168.15.97:codeq-problems
Diffstat (limited to 'robot/problems/introduction/forward1m/sl.py')
-rw-r--r-- | robot/problems/introduction/forward1m/sl.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/robot/problems/introduction/forward1m/sl.py b/robot/problems/introduction/forward1m/sl.py new file mode 100644 index 0000000..8045d58 --- /dev/null +++ b/robot/problems/introduction/forward1m/sl.py @@ -0,0 +1,23 @@ +# coding=utf-8 + +name = 'Naprej 1m' +slug = 'Naprej 1m' + +description = '''\ +<p>Napiši program, da bo robot peljal naravnost naprej 3 sekunde in se nato ustavil.</p>''' + +hint = { + 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''], + 'connectMotorLeft':['''<p>Robotu priključi levi motor</p>''', + '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''], + 'connectMotorRight':['''<p>Robotu priključi desni motor</p>''', + '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''], + 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi za 3 sekunde.</p>''', + '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''], + 'onForRotations':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev določeno s številom obratov.</p>''', + '''<p><code>robot.move_steering('on_for_rotations', ... )</code>.</p>'''], + 'direction':['''<p>Navedi smer premikanja motorjev, naravnost = 0.</p>''', + '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, ... )</code>.</p>'''], + 'rotations':['''<p>Določi število obratov; za koliko obratov naj se zavrtita motorja? Izmeri dolžino 1m, izpisuj obrate <code>print(robot.motor['left'].count_per_rot, robot.motor['right'].count_per_rot)</code> in tako določi ustrezno število obratov.</p>''', + '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, rotations=5 )</code>.</p>'''], +} |