diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
commit | 165c7165bb2184c9c9e0576a074ba4f29052bf8f (patch) | |
tree | 9b86dbbd1d4c39b52bfd7f54cfb13c2354727a53 /robot/problems/introduction/rotateback | |
parent | 4cdea335b0951e3c12dfb7b906f958d6b5be25c6 (diff) | |
parent | c1bb0d56b2c0482c766d094c65fdf0fd9d1aa0ba (diff) |
Merge branch 'master' of 192.168.15.97:codeq-problems
Conflicts:
python/problems/functions/palindrome/sl.py
python/problems/functions/palindromic_numbers/sl.py
Diffstat (limited to 'robot/problems/introduction/rotateback')
-rw-r--r-- | robot/problems/introduction/rotateback/common.py | 3 | ||||
-rw-r--r-- | robot/problems/introduction/rotateback/naloga11_rotateBack.py | 3 | ||||
-rw-r--r-- | robot/problems/introduction/rotateback/sl.py | 12 |
3 files changed, 13 insertions, 5 deletions
diff --git a/robot/problems/introduction/rotateback/common.py b/robot/problems/introduction/rotateback/common.py index 10cca87..7c8ce44 100644 --- a/robot/problems/introduction/rotateback/common.py +++ b/robot/problems/introduction/rotateback/common.py @@ -10,9 +10,6 @@ number = 11 visible = True solution = '''\ -from ev3dev import * -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/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): 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':['''<p>Program naj teče v neskončni zanki.</p>''', '''<p><code>while 1:</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>Robotu dodamo žiroskop in ga resetiramo.</li> + <li>Robotu dodamo stikalo.</li> + <li>V neskončni zanki beremo vrednost kota z žiroskopom.</li> + <li>Glede na zasuk iz začetne lege, robota na mestu obrnemo v začetno smer.</li> +</ol>''' +] |