From b4e46b75f5e2a890b41d2e20a89767590e54ccb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 15 Dec 2015 10:34:40 +0100 Subject: Dodani plani za robotske probleme. --- robot/problems/introduction/forward/sl.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'robot/problems/introduction/forward') 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':['''

Napiši časovno omejitev v sekundah.

''', '''

robot.move_steering( 'on_for_seconds', direction=0, seconds=3 ).

'''], } + +plan = ['''\ +

Program izvedemo v naslednjih korakih:

+
    +
  1. Naredimo objekt mindstorms_widgets(), s katerim predstavimo robota.
  2. +
  3. Nanj povežemo oba pogonska motorja.
  4. +
  5. Vklopimo oba motorja v sinhronem načinu tako, da robot vozi naravnost.
  6. +
  7. Določimo čas trajanja vožnje 3 sekunde.
  8. +
''' +] -- cgit v1.2.1 From 0883cb2a6b0bac23bd7553618f4e8db7c882a757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 15 Dec 2015 13:13:49 +0100 Subject: Popravki programov pred zagovorom projekta. --- robot/problems/introduction/forward/common.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'robot/problems/introduction/forward') 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' ) -- cgit v1.2.1 From f80206e6a4e4cec1574a375cb04dbdf07d3e02cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Wed, 23 Dec 2015 11:28:05 +0100 Subject: angleska verzija --- robot/problems/introduction/forward/en.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'robot/problems/introduction/forward') diff --git a/robot/problems/introduction/forward/en.py b/robot/problems/introduction/forward/en.py index be73921..5f78d57 100644 --- a/robot/problems/introduction/forward/en.py +++ b/robot/problems/introduction/forward/en.py @@ -8,5 +8,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']+['''

robot.move_steering( 'on_for_seconds', direction=0, ... ).

'''], + 'seconds':mod.hint['seconds']+['''

robot.move_steering( 'on_for_seconds', direction=0, seconds=3 ).

'''], } + +plan = ['''\ +

The program should:

+
    +
  1. create a mindstorms_widgets() object, which represents the robot in your code.
  2. +
  3. connect the driving motors.
  4. +
  5. synchronize the motors and run them so that the robot would move forward for 3 seconds.
  6. +
''' +] \ No newline at end of file -- cgit v1.2.1 From bebd9806a957cd91fe0e507091bc7d0fd385f865 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 23 Dec 2015 14:57:52 +0100 Subject: Fix: import robot hints from the correct directory --- robot/problems/introduction/forward/en.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'robot/problems/introduction/forward') diff --git a/robot/problems/introduction/forward/en.py b/robot/problems/introduction/forward/en.py index 5f78d57..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' @@ -24,4 +27,4 @@ plan = ['''\
  • connect the driving motors.
  • synchronize the motors and run them so that the robot would move forward for 3 seconds.
  • ''' -] \ No newline at end of file +] -- cgit v1.2.1