summaryrefslogtreecommitdiff
path: root/robot/problems/introduction/forward/common.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-30 11:54:55 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-30 11:54:55 +0200
commitf08c7bfd6d3631d75083b8d14fb2c427be7b2a9d (patch)
tree404fe4e4c983b1614a395d12acd250061fea832b /robot/problems/introduction/forward/common.py
parenta1822f825d3ddfc7c8ece0b029604d3def8d6ecb (diff)
Add the first robot problem
Diffstat (limited to 'robot/problems/introduction/forward/common.py')
-rw-r--r--robot/problems/introduction/forward/common.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/robot/problems/introduction/forward/common.py b/robot/problems/introduction/forward/common.py
new file mode 100644
index 0000000..5023d7f
--- /dev/null
+++ b/robot/problems/introduction/forward/common.py
@@ -0,0 +1,33 @@
+# coding=utf-8
+
+from server.hints import Hint
+
+id = 202
+group = 'introduction'
+number = 1
+visible = True
+
+solution = '''\
+import time
+from ev3dev import *
+from mindstorms_widgets import mindstorms_widgets
+
+robot = mindstorms_widgets()
+robot.connect_motor('left')
+robot.connect_motor('right')
+
+robot.move_steering('on', power=50)
+time.sleep(3)
+robot.move_steering('off', brake_at_end=True)
+'''
+
+hint_type = {
+ 'ev3dev': Hint('ev3dev'),
+ 'mindWidgets': Hint('mindWidgets'),
+}
+
+def test(program):
+ return False, []
+
+def hint(program):
+ return []