summaryrefslogtreecommitdiff
path: root/robot/problems/introduction/forward
diff options
context:
space:
mode:
Diffstat (limited to 'robot/problems/introduction/forward')
-rw-r--r--robot/problems/introduction/forward/common.py3
-rw-r--r--robot/problems/introduction/forward/en.py20
-rw-r--r--robot/problems/introduction/forward/sl.py10
3 files changed, 29 insertions, 4 deletions
diff --git a/robot/problems/introduction/forward/common.py b/robot/problems/introduction/forward/common.py
index 5a46d86..0793d72 100644
--- a/robot/problems/introduction/forward/common.py
+++ b/robot/problems/introduction/forward/common.py
@@ -9,9 +9,6 @@ number = 1
visible = True
solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
robot = mindstorms_widgets()
robot.connect_motor( 'left' )
robot.connect_motor( 'right' )
diff --git a/robot/problems/introduction/forward/en.py b/robot/problems/introduction/forward/en.py
index be73921..400c452 100644
--- a/robot/problems/introduction/forward/en.py
+++ b/robot/problems/introduction/forward/en.py
@@ -1,5 +1,8 @@
# coding=utf-8
+import server
+mod = server.problems.load_language('robot', 'en')
+
name = 'Forward 3s'
slug = 'Forward 3s'
@@ -8,5 +11,20 @@ description = '''\
'''
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>'''
+]
diff --git a/robot/problems/introduction/forward/sl.py b/robot/problems/introduction/forward/sl.py
index a6f7e86..cd9b096 100644
--- a/robot/problems/introduction/forward/sl.py
+++ b/robot/problems/introduction/forward/sl.py
@@ -21,3 +21,13 @@ hint = {
'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
'''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=3 )</code>.</p>'''],
}
+
+plan = ['''\
+<p>Program izvedemo v naslednjih korakih:</p>
+<ol>
+ <li>Naredimo objekt mindstorms_widgets(), s katerim predstavimo robota.</li>
+ <li>Nanj povežemo oba pogonska motorja.</li>
+ <li>Vklopimo oba motorja v sinhronem načinu tako, da robot vozi naravnost.</li>
+ <li>Določimo čas trajanja vožnje 3 sekunde.</li>
+</ol>'''
+]