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/countlines/common.py | 1 + robot/problems/introduction/countlines/sl.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'robot/problems/introduction/countlines') diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 6a50988..925fc06 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -31,6 +31,7 @@ while time.time()-start < 2.1: stevec += 1 color = c robot.move_steering( 'off' ) + print( "Stevilo crt:", stevec ) ''' diff --git a/robot/problems/introduction/countlines/sl.py b/robot/problems/introduction/countlines/sl.py index 4e1c3d4..1f8ea18 100644 --- a/robot/problems/introduction/countlines/sl.py +++ b/robot/problems/introduction/countlines/sl.py @@ -24,3 +24,16 @@ hint = { '''

Zanka je lahko časovno omejena, npr. z uporabo metode time.time().

''', '''

while time.time()-start < 1.1:.

'''], } + +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. Povežemo barvni senzor.
  6. +
  7. Vklopimo oba motorja tako, da robot vozi naravnost.
  8. +
  9. V zanki naj robot bere barve in jih šteje.
  10. +
  11. Zanka naj se konča po vnaprej določenem času, npr. 3 sekunde.
  12. +
  13. Ustavimo oba motorja.
  14. +
''' +] -- cgit v1.2.1