From be94b55b835283de53c686343164641e15abe806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Mon, 14 Dec 2015 12:44:58 +0100 Subject: Zadnje spremembe pred zagovorom. --- robot/problems/introduction/rotateback/common.py | 1 - robot/problems/introduction/rotateback/naloga11_rotateBack.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'robot/problems/introduction/rotateback') diff --git a/robot/problems/introduction/rotateback/common.py b/robot/problems/introduction/rotateback/common.py index 10cca87..2dacaf3 100644 --- a/robot/problems/introduction/rotateback/common.py +++ b/robot/problems/introduction/rotateback/common.py @@ -10,7 +10,6 @@ number = 11 visible = True solution = '''\ -from ev3dev import * from mindstorms_widgets import mindstorms_widgets def sgn(x): diff --git a/robot/problems/introduction/rotateback/naloga11_rotateBack.py b/robot/problems/introduction/rotateback/naloga11_rotateBack.py index 0bab735..2677f05 100644 --- a/robot/problems/introduction/rotateback/naloga11_rotateBack.py +++ b/robot/problems/introduction/rotateback/naloga11_rotateBack.py @@ -2,12 +2,11 @@ # coding=utf-8 print (""" -Naloga 11: +Naloga 11: Robot naj drži smer - če ga obrnemo iz začetne smeri, naj se zasuka nazaj v prvotno smer. Ob pritisku na stikalo, naj se resetira (smer nastavi na 0). """) import sys sys.path.append('/home/user/codeq') import time -from ev3dev import * from mindstorms_widgets import mindstorms_widgets def sgn(x): -- cgit v1.2.1 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/rotateback/common.py | 2 -- robot/problems/introduction/rotateback/sl.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'robot/problems/introduction/rotateback') diff --git a/robot/problems/introduction/rotateback/common.py b/robot/problems/introduction/rotateback/common.py index 2dacaf3..7c8ce44 100644 --- a/robot/problems/introduction/rotateback/common.py +++ b/robot/problems/introduction/rotateback/common.py @@ -10,8 +10,6 @@ number = 11 visible = True solution = '''\ -from mindstorms_widgets import mindstorms_widgets - def sgn(x): return -1 if x<0 else (1 if x>0 else 0) diff --git a/robot/problems/introduction/rotateback/sl.py b/robot/problems/introduction/rotateback/sl.py index 269ea34..3242a80 100644 --- a/robot/problems/introduction/rotateback/sl.py +++ b/robot/problems/introduction/rotateback/sl.py @@ -31,3 +31,15 @@ hint = { 'while':['''

Program naj teče v neskončni zanki.

''', '''

while 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. Robotu dodamo žiroskop in ga resetiramo.
  6. +
  7. Robotu dodamo stikalo.
  8. +
  9. V neskončni zanki beremo vrednost kota z žiroskopom.
  10. +
  11. Glede na zasuk iz začetne lege, robota na mestu obrnemo v začetno smer.
  12. +
''' +] -- cgit v1.2.1