summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 13:00:05 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 13:00:05 +0200
commita86a6ca92d315dedf3ce4d5035a4c38178f8b531 (patch)
tree96ae9beb094aa8bfa74d69a0878349107e900b04
parent1e5d42ba53ea0c631dbc6f21887839c91571ebca (diff)
Remove backup files and add *~ to .gitignore
-rw-r--r--.gitignore1
-rw-r--r--robot/problems/introduction/circle20/common.py~63
-rw-r--r--robot/problems/introduction/circle20/sl.py~24
-rw-r--r--robot/problems/introduction/countlines/common.py~79
-rw-r--r--robot/problems/introduction/countlines/sl.py~29
-rw-r--r--robot/problems/introduction/followline/common.py~85
-rw-r--r--robot/problems/introduction/followline/sl.py~35
-rw-r--r--robot/problems/introduction/forward/common.py~60
-rw-r--r--robot/problems/introduction/forward/en.py~20
-rw-r--r--robot/problems/introduction/forward/sl.py~23
-rw-r--r--robot/problems/introduction/forward1m/common.py~61
-rw-r--r--robot/problems/introduction/forward1m/sl.py~24
-rw-r--r--robot/problems/introduction/gyro90/common.py~80
-rw-r--r--robot/problems/introduction/gyro90/naloga07_gyro90.py~34
-rw-r--r--robot/problems/introduction/gyro90/sl.py~32
-rw-r--r--robot/problems/introduction/gyrosquare/common.py~103
-rw-r--r--robot/problems/introduction/gyrosquare/sl.py~40
-rw-r--r--robot/problems/introduction/printcolors/common.py~80
-rw-r--r--robot/problems/introduction/printcolors/sl.py~37
-rw-r--r--robot/problems/introduction/rotateback/common.py~111
-rw-r--r--robot/problems/introduction/rotateback/sl.py~36
-rw-r--r--robot/problems/introduction/spotturn90/common.py~61
-rw-r--r--robot/problems/introduction/spotturn90/sl.py~24
-rw-r--r--robot/problems/introduction/square20/common.py~76
-rw-r--r--robot/problems/introduction/square20/sl.py~27
-rw-r--r--robot/problems/introduction/wall1m/common.py~80
-rw-r--r--robot/problems/introduction/wall1m/naloga06_wall1m.py~31
-rw-r--r--robot/problems/introduction/wall1m/sl.py~31
28 files changed, 1 insertions, 1386 deletions
diff --git a/.gitignore b/.gitignore
index f7bfeff..2ffdadb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.idea
*.pyc
*.pyo
+*~
diff --git a/robot/problems/introduction/circle20/common.py~ b/robot/problems/introduction/circle20/common.py~
deleted file mode 100644
index eb171ae..0000000
--- a/robot/problems/introduction/circle20/common.py~
+++ /dev/null
@@ -1,63 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 205
-group = 'introduction'
-number = 5
-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' )
-
-fct = 9 # full circle time
-rad = 20 # Direction to make a good radius for the circle
-robot.move_steering( 'on_for_seconds', direction=rad, power=40, seconds=fct )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteering': Hint('moveSteering'),
- 'onForSeconds': Hint('onForSeconds'),
- 'direction': Hint('direction'),
- 'seconds': Hint('seconds'),
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['move_steering']):
- return [{'id': 'moveSteering'}]
-
- if not has_token_sequence(tokens, ['on_for_seconds']):
- return [{'id': 'onForSeconds'}]
-
- if not has_token_sequence(tokens, ['direction']):
- return [{'id': 'direction'}]
-
- if not has_token_sequence(tokens, ['seconds']):
- return [{'id': 'seconds'}]
-
- return None
diff --git a/robot/problems/introduction/circle20/sl.py~ b/robot/problems/introduction/circle20/sl.py~
deleted file mode 100644
index 656253d..0000000
--- a/robot/problems/introduction/circle20/sl.py~
+++ /dev/null
@@ -1,24 +0,0 @@
-# coding=utf-8
-
-id = 205
-name = 'Krog 20 cm'
-slug = 'Krog 20 cm'
-
-description = '''\
-<p>Napiši program, s katerim bo robot enkrat prevozil krog s polmerom 20 cm in se nato ustavil.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi za 3 sekunde.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''],
- 'onForSeconds':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev časovno omejeno.</p>''',
- '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''],
- 'direction':['''<p>Navedi smer premikanja motorjev; pozitivne vrednosti pomenijo zavoj v desno.</p>''',
- '''<p>Določi vrednost parametra direction tako, da bo robot krožil po krogu s polmerom 20cm. Vrednost je odvisna od konstrukcije robota in podlage.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=20, ... )</code>.</p>'''],
- 'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
- '''<p>Za dani polmer izmeri čas, ki ga robot potrebuje za en obhod.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=3 )</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/countlines/common.py~ b/robot/problems/introduction/countlines/common.py~
deleted file mode 100644
index 6e5d135..0000000
--- a/robot/problems/introduction/countlines/common.py~
+++ /dev/null
@@ -1,79 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 206
-group = 'introduction'
-number = 10
-visible = True
-
-solution = '''\
-import time
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-color_table = ['none', 'black', 'blue', 'green', 'yellow', 'red', 'white', 'brown']
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'color' )
-
-robot.move_steering( 'on' )
-start = time.time()
-stevec = 0
-color = -1
-while time.time()-start < 2.1:
- c = robot.color_sensor_measure( 'color' ) # values: 0-7 see the scale above
- if c!=color:
- if c!=6 and c!=0:
- stevec += 1
- color = c
-robot.move_steering( 'off' )
-print( "Stevilo crt:", stevec )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteeringOn': Hint('moveSteeringOn'),
- 'moveSteeringOff': Hint('moveSteeringOff'),
- 'connectColorSensor': Hint('connectColorSensor'),
- 'colorSensorMeasure': Hint('colorSensorMeasure'),
- 'while': Hint('while')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not (has_token_sequence(tokens, ['connect_sensor', '(' ]) and 'color' in code):
- return [{'id': 'connectColorSensor'}]
-
- if not has_token_sequence(tokens, ['move_steering', '(', 'on', ')']):
- return [{'id': 'moveSteeringOn'}]
-
- if not has_token_sequence(tokens, ['move_steering', '(', 'off', ')']):
- return [{'id': 'moveSteeringOff'}]
-
- if not (has_token_sequence(tokens, ['color_sensor_measure', '(']) and 'color' in code):
- return [{'id': 'colorSensorMeasure'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- return None
diff --git a/robot/problems/introduction/countlines/sl.py~ b/robot/problems/introduction/countlines/sl.py~
deleted file mode 100644
index 6b759ad..0000000
--- a/robot/problems/introduction/countlines/sl.py~
+++ /dev/null
@@ -1,29 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 206
-name = 'Preštej črte'
-slug = 'Preštej črte'
-
-description = '''\
-<p>Robot naj pelje naravnost, pravokotno na črte in naj jih prešteje.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu priključi levi motor</p>''',
- '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu priključi desni motor</p>''',
- '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteeringOn':['''<p>Sinhroniziraj motorja in ju zaženi.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( 'on' )</code>.</p>'''],
- 'moveSteeringOff':['''<p>Ustavi motorja.</p>''',
- '''<p><code>robot.move_steering( 'off' )</code>.</p>'''],
- 'connectColorSensor':['''<p>Robotu moramo priključiti barvni senzor.</p>''',
- '''<p><code>robot.connect_sensor( 'color' )</code>.</p>'''],
- 'colorSensorMeasure':['''<p>Medtem ko se robot pomika naprej, naj uporabi barvni senzor v načinu 'color', s katerim pove, katero barvo trenutno vidi.</p>''',
- '''<p><code>robot.color_sensor_measure( 'color' )</code>.</p>'''],
- 'while':['''<p>Uporabi zanko, znotraj katere robot odčitava barve in povečuje števec.</p>''',
- '''<p>Zanka je lahko časovno omejena, npr. z uporabo metode <code>time.time()</code>.</p>''',
- '''<p><code>while time.time()-start < 1.1:</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/followline/common.py~ b/robot/problems/introduction/followline/common.py~
deleted file mode 100644
index 5a3db5b..0000000
--- a/robot/problems/introduction/followline/common.py~
+++ /dev/null
@@ -1,85 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 207
-group = 'introduction'
-number = 12
-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.connect_sensor( 'color' )
-
-start = time.time()
-while time.time()-start < 10:
- if robot.color_sensor_measure('reflected_light_intensity') < 30:
- L, R = 0, 20
- else:
- L, R = 20, 0
- robot.move_tank( 'on', lr_power=[L,R])
-robot.move_tank( 'off' )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveTankOn': Hint('moveTankOn'),
- 'lrPower': Hint('lr_power'),
- 'moveTankOff': Hint('moveTankOff'),
- 'connectColorSensor': Hint('connectColorSensor'),
- 'colorSensorMeasureRLI': Hint('colorSensorMeasureRLI'),
- 'while': Hint('while'),
- 'time': Hint('time'),
- 'if': Hint('if')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['connect_sensor', '(', 'color', ')' ]):
- return [{'id': 'connectColorSensor'}]
-
- if not has_token_sequence(tokens, ['move_tank', '(', 'on', ')']):
- return [{'id': 'moveTankOn'}]
-
- if not has_token_sequence(tokens, ['lr_power']):
- return [{'id': 'lrPower'}]
-
- if not has_token_sequence(tokens, ['move_tank', '(', 'off', ')']):
- return [{'id': 'moveTankOff'}]
-
- if not has_token_sequence(tokens, ['color_sensor_measure', '(', 'reflected_light_intensity', ')']):
- return [{'id': 'colorSensorMeasureRLI'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- if not has_token_sequence(tokens, ['time']):
- return [{'id': 'time'}]
-
- if not has_token_sequence(tokens, ['if']):
- return [{'id': 'if'}]
-
- return None
diff --git a/robot/problems/introduction/followline/sl.py~ b/robot/problems/introduction/followline/sl.py~
deleted file mode 100644
index 5d201fe..0000000
--- a/robot/problems/introduction/followline/sl.py~
+++ /dev/null
@@ -1,35 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 207
-name = 'Sledenje črti'
-slug = 'Sledenje črti'
-
-description = '''\
-<p>Robot naj 10 sekund sledi črni črti na beli podlagi; pri tem naj si pomaga z barvnim senzorjem.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
-
- 'moveTankOn':['''<p>Uporabi metodo za ločen nadzor motorjev, s katero vsakemu od motorjev nastavljaš drugačno moč.</p>''',
- '''<p>Za to je najbolj primerna metoda <code>robot.move_tank( ... )</code>.</p>''',
- '''<p><code>robot.move_tank( 'on', ...)</code></p>'''],
- 'lrPower': ['''<p>Nastavi parameter s katerim nastaviš moči levega in desnega motorja.</p>''',
- '''<p><code>robot.move_tank( 'on', lr_power=[ ... ])</code></p>'''],
- 'moveTankOff': ['''Ustavi robota.''',
- '''<p><code>robot.move_tank( 'off' )</code></p>'''],
- 'connectColorSensor':['''<p>Robotu moramo priključiti barvni senzor.</p>''',
- '''<p><code>robot.connect_sensor( 'color' )</code>.</p>'''],
- 'colorSensorMeasureRLI':['''<p>Medtem ko se robot pomika naprej, naj uporabi barvni senzor v načinu 'reflected_light_intensity', za zaznavanje jakosti odbite svetlobe.</p>''',
- '''<p><code>robot.color_sensor_measure( 'reflected_light_intensity' )</code>.</p>'''],
- 'while':['''<p>Uporabi zanko, znotraj katere robot sledi črti.</p>''',
- '''<p>Zanka naj bo časovno omejena, npr. z uporabo metode <code>time.time()</code>.</p>''',
- '''<p><code>start = time.time()\nwhile time.time()-start < 10:</code>.</p>'''],
- 'time': ['''Uporabi metodo time() za merjenje časa.''',
- '''<p><code>start = time.time()\nwhile time.time()-start < 10:</code></p>'''],
- 'if': ['''<p>V zanki uporabi pogojni stavek...</p>''',
- '''<p>Če robot vidi črto, naj zavije z nje; če vidi podlago, naj zavije proti črti.</p>''']
-} \ No newline at end of file
diff --git a/robot/problems/introduction/forward/common.py~ b/robot/problems/introduction/forward/common.py~
deleted file mode 100644
index f6330fd..0000000
--- a/robot/problems/introduction/forward/common.py~
+++ /dev/null
@@ -1,60 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 202
-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_for_seconds', direction=0, seconds=3 )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteering': Hint('moveSteering'),
- 'onForSeconds': Hint('onForSeconds'),
- 'direction': Hint('direction'),
- 'seconds': Hint('seconds'),
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['move_steering']):
- return [{'id': 'moveSteering'}]
-
- if not has_token_sequence(tokens, ['on_for_seconds']):
- return [{'id': 'onForSeconds'}]
-
- if not has_token_sequence(tokens, ['direction']):
- return [{'id': 'direction'}]
-
- if not has_token_sequence(tokens, ['seconds']):
- return [{'id': 'seconds'}]
-
- return None
diff --git a/robot/problems/introduction/forward/en.py~ b/robot/problems/introduction/forward/en.py~
deleted file mode 100644
index 4337ac5..0000000
--- a/robot/problems/introduction/forward/en.py~
+++ /dev/null
@@ -1,20 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'en')
-
-<<<<<<< HEAD
-id = 202
-name = 'Forward 3s'
-slug = 'Forward 3s'
-=======
-name = 'Forward'
-slug = 'Forward'
->>>>>>> 5a01c2bb184152c6ccc3c536e9b857d247bc55ad
-
-description = '''\
-<p>Write a program that would make the robot drive straight forward for 3 seconds and stop</p>
-'''
-
-hint = {
-
-}
diff --git a/robot/problems/introduction/forward/sl.py~ b/robot/problems/introduction/forward/sl.py~
deleted file mode 100644
index a6f7e86..0000000
--- a/robot/problems/introduction/forward/sl.py~
+++ /dev/null
@@ -1,23 +0,0 @@
-# coding=utf-8
-
-name = 'Naprej 3s'
-slug = 'Naprej 3s'
-
-description = '''\
-<p>Napiši program, da bo robot peljal naravnost naprej 3 sekunde in se nato ustavil.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu priključi levi motor</p>''',
- '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu priključi desni motor</p>''',
- '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi za 3 sekunde.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''],
- 'onForSeconds':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev časovno omejeno.</p>''',
- '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''],
- 'direction':['''<p>Navedi smer premikanja motorjev, naravnost = 0.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, ... )</code>.</p>'''],
- 'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=3 )</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/forward1m/common.py~ b/robot/problems/introduction/forward1m/common.py~
deleted file mode 100644
index 809fe9d..0000000
--- a/robot/problems/introduction/forward1m/common.py~
+++ /dev/null
@@ -1,61 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 208
-group = 'introduction'
-number = 2
-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_for_rotations', direction=0, rotations=5.71 )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteering': Hint('moveSteering'),
- 'onForRotations': Hint('onForRotations'),
- 'direction': Hint('direction'),
- 'rotations': Hint('rotations'),
-}
-
-def hint(code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['move_steering']):
- return [{'id': 'moveSteering'}]
-
- if not has_token_sequence(tokens, ['on_for_rotations']):
- return [{'id': 'onForRotations'}]
-
- if not has_token_sequence(tokens, ['direction']):
- return [{'id': 'direction'}]
-
- if not has_token_sequence(tokens, ['rotations']):
- return [{'id': 'rotations'}]
-
- return None
diff --git a/robot/problems/introduction/forward1m/sl.py~ b/robot/problems/introduction/forward1m/sl.py~
deleted file mode 100644
index e8071ee..0000000
--- a/robot/problems/introduction/forward1m/sl.py~
+++ /dev/null
@@ -1,24 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 208
-name = 'Naprej 1m'
-slug = 'Naprej 1m'
-
-description = '''\
-<p>Napiši program, da bo robot peljal naravnost naprej 3 sekunde in se nato ustavil.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi za 3 sekunde.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''],
- 'onForRotations':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev določeno s številom obratov.</p>''',
- '''<p><code>robot.move_steering('on_for_rotations', ... )</code>.</p>'''],
- 'direction':['''<p>Navedi smer premikanja motorjev, naravnost = 0.</p>''',
- '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, ... )</code>.</p>'''],
- 'rotations':['''<p>Določi število obratov; za koliko obratov naj se zavrtita motorja? Izmeri dolžino 1m, izpisuj obrate <code>print(robot.motor['left'].count_per_rot, robot.motor['right'].count_per_rot)</code> in tako določi ustrezno število obratov.</p>''',
- '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, rotations=5 )</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/gyro90/common.py~ b/robot/problems/introduction/gyro90/common.py~
deleted file mode 100644
index c02a2c4..0000000
--- a/robot/problems/introduction/gyro90/common.py~
+++ /dev/null
@@ -1,80 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 209
-group = 'introduction'
-number = 7
-visible = True
-
-solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'gyro' )
-
-robot.gyro_set_mode( 'angle' )
-robot.reset_gyro()
-
-power = 15
-robot.move_tank( 'on', lr_power=[power,-power] )
-while robot.gyro_sensor_measure() < 90:
- pass
-robot.move_tank( 'off' )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'connectGyro': Hint('connectGyro'),
- 'resetGyro': Hint('resetGyro'),
- 'setGyroMode': Hint('setGyroMode'),
- 'gyroMeasure': Hint('gyroMeasure'),
- 'moveTank': Hint('moveTank'),
- 'lrPower': Hint('lrPower'),
- 'while': Hint('while')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['connect_gyro','(', 'gyro', ')']):
- return [{'id': 'connectGyro'}]
-
- if not has_token_sequence(tokens, ['reset_gyro()']):
- return [{'id': 'resetGyro'}]
-
- if not has_token_sequence(tokens, ['gyro_set_mode']):
- return [{'id': 'setGyroMode'}]
-
- if not has_token_sequence(tokens, ['gyro_sensor_measure()']):
- return [{'id': 'gyroMeasure'}]
-
- if not has_token_sequence(tokens, ['move_tank']):
- return [{'id': 'moveTank'}]
-
- if not has_token_sequence(tokens, ['lr_power']):
- return [{'id': 'lrPower'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- return None
diff --git a/robot/problems/introduction/gyro90/naloga07_gyro90.py~ b/robot/problems/introduction/gyro90/naloga07_gyro90.py~
deleted file mode 100644
index 97e42ee..0000000
--- a/robot/problems/introduction/gyro90/naloga07_gyro90.py~
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-# coding=utf-8
-
-print """
-Naloga 7:
- Robot naj se na mestu obrne za 90 stopinj v desno; pri tem naj si pomaga z ziroskopom.
-"""
-
-import time
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-gs = gyro_sensor();
-assert gs.connected
-gs.mode = 'GYRO-ANG' # Angle (degrees), value: (-32768 to 32767)
-
-# for m in us.modes:
-# print "\t",m
-#exit()
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-
-power = 15
-robot.move_tank( 'on', lr_power=[power,-power] )
-while gs.value()<90:
- pass
-robot.move_tank( 'off', brake_at_end=True )
-# print gs.value()
-# gs = gyro_sensor();
-# assert gs.connected
-# gs.mode = 'GYRO-ANG'
-#
-# print "--->",gs.value() \ No newline at end of file
diff --git a/robot/problems/introduction/gyro90/sl.py~ b/robot/problems/introduction/gyro90/sl.py~
deleted file mode 100644
index 76939f7..0000000
--- a/robot/problems/introduction/gyro90/sl.py~
+++ /dev/null
@@ -1,32 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 209
-name = 'Žiroskop 90'
-slug = 'Žiroskop 90'
-
-description = '''\
-<p>Robot naj se na mestu obrne za 90 stopinj v desno; pri tem naj si pomaga z žiroskopom.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu priključi levi motor.</p>''',
- '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu priključi desni motor.</p>''',
- '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'connectGyro':['''<p>Robotu priključi žiroskop.</p>''',
- '''<p><code>robot.connect_sensor( 'gyro' )</code>.</p>'''],
- 'resetGyro':['''<p>Žiroskop na začetku resetiraj.</p>''',
- '''<p><code>robot.reset_gyro()</code>.</p>'''],
- 'setGyroMode':['''<p>Žiroskopu nastavi način delovanja na merjenje kotov.</p>''',
- '''<p><code>robot.gyro_set_mode('angle')</code>.</p>'''],
- 'gyroMeasure':['''<p>Preberi vrednost žiroskopa.</p>''',
- '''<p><code>robot.gyro_sensor_measure()</code>.</p>'''],
- 'lrPower':['''<p>Za obrat na mestu se morata kolesi vrteti z enako močjo in v nasprotni smeri.</p>''',
- '''<p><code>robot.move_tank( 'on', lr_power=[hitrost, -hitrost], ... )</code>.</p>'''],
- 'moveTank':['''<p>Robot naj se obrne na mestu.</p>''',
- '''<p>Najprimernejša metoda za to je <code>move_tank</code></p>'''],
- 'while':['''<p>Program naj teče dokler je kot zasuka manjši od 90 stopinj.</p>''',
- '''<p><code>robot.gyro_sensor_measure() < 90:</code></p>'''],
-} \ No newline at end of file
diff --git a/robot/problems/introduction/gyrosquare/common.py~ b/robot/problems/introduction/gyrosquare/common.py~
deleted file mode 100644
index 1c31f92..0000000
--- a/robot/problems/introduction/gyrosquare/common.py~
+++ /dev/null
@@ -1,103 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 210
-group = 'introduction'
-number = 8
-visible = True
-
-solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'gyro' )
-
-robot.gyro_set_mode( 'angle' )
-robot.reset_gyro()
-
-power = 20
-def forward_and_turnRight(power, angle):
- robot.move_steering( 'on_for_seconds', direction=0, power=power, seconds=2 )
- robot.move_tank( 'on', lr_power=[power,-power] )
- while robot.gyro_sensor_measure( 'angle' ) < angle:
- pass
- robot.move_tank( 'off' )
-
-forward_and_turnRight(power, 89)
-forward_and_turnRight(power, 179)
-forward_and_turnRight(power, 269)
-forward_and_turnRight(power, 359)
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteering': Hint('moveSteering'),
- 'onForSeconds': Hint('onForSeconds'),
- 'direction': Hint('direction'),
- 'seconds': Hint('seconds'),
- 'connectGyro': Hint('connectGyro'),
- 'resetGyro': Hint('resetGyro'),
- 'setGyroMode': Hint('setGyroMode'),
- 'gyroMeasure': Hint('gyroMeasure'),
- 'moveTank': Hint('moveTank'),
- 'lrPower': Hint('lrPower'),
- 'while': Hint('while')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['connect_gyro','(', 'gyro', ')']):
- return [{'id': 'connectGyro'}]
-
- if not has_token_sequence(tokens, ['reset_gyro()']):
- return [{'id': 'resetGyro'}]
-
- if not has_token_sequence(tokens, ['gyro_set_mode']):
- return [{'id': 'setGyroMode'}]
-
- if not has_token_sequence(tokens, ['gyro_sensor_measure()']):
- return [{'id': 'gyroMeasure'}]
-
- if not has_token_sequence(tokens, ['move_tank']):
- return [{'id': 'moveTank'}]
-
- if not has_token_sequence(tokens, ['move_steering']):
- return [{'id': 'moveSteering'}]
-
- if not 'on_for_seconds' in code:
- return [{'id': 'onForSeconds'}]
-
- if not 'direction' in code:
- return [{'id': 'direction'}]
-
- if not 'seconds' in code:
- return [{'id': 'seconds'}]
-
- if not 'lr_power' in code:
- return [{'id': 'lrPower'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- return None
diff --git a/robot/problems/introduction/gyrosquare/sl.py~ b/robot/problems/introduction/gyrosquare/sl.py~
deleted file mode 100644
index 00171e8..0000000
--- a/robot/problems/introduction/gyrosquare/sl.py~
+++ /dev/null
@@ -1,40 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 210
-name = 'Kvadrat z žiroskopom'
-slug = 'Kvadrat z žiroskopom'
-
-description = '''\
-<p>Robot naj prevozi kvadrat s stranico 20 cm; pri tem naj si pomaga z žiroskopom.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
-
- 'connectGyro':['''<p>Robotu priključi žiroskop.</p>''',
- '''<p><code>robot.connect_sensor( 'gyro' )</code>.</p>'''],
- 'resetGyro':['''<p>Žiroskop na začetku resetiraj.</p>''',
- '''<p><code>robot.reset_gyro()</code>.</p>'''],
- 'setGyroMode':['''<p>Žiroskopu nastavi način delovanja na merjenje kotov.</p>''',
- '''<p><code>robot.gyro_set_mode('angle')</code>.</p>'''],
- 'gyroMeasure':['''<p>Preberi vrednost žiroskopa.</p>''',
- '''<p><code>robot.gyro_sensor_measure()</code>.</p>'''],
- 'lrPower':['''<p>Za obrat na mestu se morata kolesi vrteti z enako močjo in v nasprotni smeri.</p>''',
- '''<p><code>robot.move_tank( 'on', lr_power=[hitrost, -hitrost], ... )</code>.</p>'''],
- 'moveTank':['''<p>Robot naj se obrne na mestu.</p>''',
- '''<p>Najprimernejša metoda za to je <code>move_tank</code></p>'''],
- 'while':['''<p>Program naj čaka dokler je kot zasuka manjši od 90 stopinj.</p>''',
- '''<p><code>robot.gyro_sensor_measure() < 90:</code></p>'''],
-
- 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''],
- 'onForSeconds':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev časovno omejeno.</p>''',
- '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''],
- 'direction':['''<p>Navedi smer premikanja motorjev, naravnost = 0.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, ... )</code>.</p>'''],
- 'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=3 )</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/printcolors/common.py~ b/robot/problems/introduction/printcolors/common.py~
deleted file mode 100644
index 04ca0d6..0000000
--- a/robot/problems/introduction/printcolors/common.py~
+++ /dev/null
@@ -1,80 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 211
-group = 'introduction'
-number = 9
-visible = True
-
-solution = '''\
-import time
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-color_table = ['none', 'black', 'blue', 'green', 'yellow', 'red', 'white', 'brown']
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'color' )
-
-robot.move_steering( 'on')
-start = time.time()
-color = -1
-while time.time()-start < 2.1:
- c = robot.color_sensor_measure('color')
- if c!=color:
- print( c, color_table[c])
- color = c
-robot.move_steering( 'off' )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteeringOn': Hint('moveSteeringOn'),
- 'moveSteeringOff': Hint('moveSteeringOff'),
- 'connectColorSensor': Hint('connectColorSensor'),
- 'colorSensorMeasure': Hint('colorSensorMeasure'),
- 'while': Hint('while'),
- 'print': Hint('print')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['connect_sensor', '(', 'color', ')' ]):
- return [{'id': 'connectColorSensor'}]
-
- if not has_token_sequence(tokens, ['move_steering', '(', 'on', ')']):
- return [{'id': 'moveSteeringOn'}]
-
- if not has_token_sequence(tokens, ['move_steering', '(', 'off', ')']):
- return [{'id': 'moveSteeringOff'}]
-
- if not has_token_sequence(tokens, ['color_sensor_measure', '(', 'color', ')']):
- return [{'id': 'colorSensorMeasure'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- if not has_token_sequence(tokens, ['print', '(']):
- return [{'id': 'print'}]
-
- return None \ No newline at end of file
diff --git a/robot/problems/introduction/printcolors/sl.py~ b/robot/problems/introduction/printcolors/sl.py~
deleted file mode 100644
index 9d5ec21..0000000
--- a/robot/problems/introduction/printcolors/sl.py~
+++ /dev/null
@@ -1,37 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 211
-name = 'Zaznavanje barv'
-slug = 'Zaznavanje barv'
-
-description = '''\
-<p>Robot naj se pelje čez barvne črte in na zaslon izpiše barvo, ki jo zazna s svetlobnim senzorjem.
- Value Color
- 0 none
- 1 black
- 2 blue
- 3 green
- 4 yellow
- 5 red
- 6 white
- 7 brown</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteeringOn':['''<p>Sinhroniziraj motorja in ju zaženi.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( 'on' )</code>.</p>'''],
- 'moveSteeringOff':['''<p>Ustavi motorja.</p>''',
- '''<p><code>robot.move_steering( 'off' )</code>.</p>'''],
- 'connectColorSensor':['''<p>Robotu moramo priključiti barvni senzor.</p>''',
- '''<p><code>robot.connect_sensor( 'color' )</code>.</p>'''],
- 'colorSensorMeasure':['''<p>Medtem ko se robot pomika naprej, naj uporabi barvni senzor v načinu 'color', s katerim pove, katero barvo trenutno vidi.</p>''',
- '''<p><code>robot.color_sensor_measure( 'color' )</code>.</p>'''],
- 'while':['''<p>Uporabi zanko, znotraj katere robot odčitava barve in povečuje števec.</p>''',
- '''<p>Zanka je lahko časovno omejena, npr. z uporabo metode <code>time.time()</code>.</p>''',
- '''<p><code>while time.time()-start < 1.1:</code>.</p>'''],
- 'print':['''<p>V zanki na zaslon izpisuj barvo, ki jo zazna robot.</p>''']
-} \ No newline at end of file
diff --git a/robot/problems/introduction/rotateback/common.py~ b/robot/problems/introduction/rotateback/common.py~
deleted file mode 100644
index c7c199c..0000000
--- a/robot/problems/introduction/rotateback/common.py~
+++ /dev/null
@@ -1,111 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 212
-group = 'introduction'
-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)
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'gyro' )
-robot.connect_sensor( 'touch' )
-
-smer = hitrost = 0
-robot.reset_gyro()
-robot.gyro_set_mode( 'angle' )
-prev_smer = -1
-while 1:
- smer = robot.gyro_sensor_measure()
- if smer!=prev_smer:
- print ("Kot:", smer)
- prev_smer = smer
-
- if robot.touch_sensor_measure():
- robot.reset_gyro()
- print ( robot.gyro_sensor_measure() )
-
- if abs(smer) < 10:
- hitrost = 10*sgn(smer)
- else:
- if abs(smer) > 100:
- hitrost = 100*sgn(smer)
- else:
- hitrost = smer
-
- if abs(smer) > 1:
- L, R = -hitrost, hitrost
- else:
- L = R = 0
- robot.move_tank('on', lr_power=[L,R])
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'connectGyro': Hint('connectGyro'),
- 'connectTouch': Hint('connectTouch'),
- 'resetGyro': Hint('resetGyro'),
- 'setGyroMode': Hint('setGyroMode'),
- 'gyroMeasure': Hint('gyroMeasure'),
- 'ifTouch': Hint('ifTouch'),
- 'moveTank': Hint('moveTank'),
- 'lrPower': Hint('lrPower'),
- 'while': Hint('while')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['connect_gyro','(', 'gyro', ')']):
- return [{'id': 'connectGyro'}]
-
- if not has_token_sequence(tokens, ['connect_sensor','(', 'touch', ')']):
- return [{'id': 'connectTouch'}]
-
- if not has_token_sequence(tokens, ['reset_gyro()']):
- return [{'id': 'resetGyro'}]
-
- if not has_token_sequence(tokens, ['gyro_set_mode']):
- return [{'id': 'setGyroMode'}]
-
- if not has_token_sequence(tokens, ['gyro_sensor_measure()']):
- return [{'id': 'gyroMeasure'}]
-
- if not has_token_sequence(tokens, ['if','touch_sensor_measure','(',')']):
- return [{'id': 'ifTouch'}]
-
- if not has_token_sequence(tokens, ['move_tank']):
- return [{'id': 'moveTank'}]
-
- if not has_token_sequence(tokens, ['lr_power']):
- return [{'id': 'lrPower'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- return None
diff --git a/robot/problems/introduction/rotateback/sl.py~ b/robot/problems/introduction/rotateback/sl.py~
deleted file mode 100644
index 0b91379..0000000
--- a/robot/problems/introduction/rotateback/sl.py~
+++ /dev/null
@@ -1,36 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 212
-name = 'Drži smer'
-slug = 'Drži smer'
-
-description = '''\
-<p>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).</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu priključi levi motor</p>''',
- '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu priključi desni motor</p>''',
- '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'connectGyro':['''<p>Robotu priključi žiroskop</p>''',
- '''<p><code>robot.connect_sensor( 'gyro' )</code>.</p>'''],
- 'connectTouch':['''<p>Robotu priključi stikalo</p>''',
- '''<p><code>robot.connect_sensor( 'touch' )</code>.</p>'''],
- 'resetGyro':['''<p>Žiroskop na začetku in ob pritisku na stikalo resetiraj.</p>''',
- '''<p><code>robot.reset_gyro()</code>.</p>'''],
- 'setGyroMode':['''<p>Žiroskopu nastavi način delovanja na merjenje kotov.</p>''',
- '''<p><code>robot.gyro_set_mode('angle')</code>.</p>'''],
- 'gyroMeasure':['''<p>Preberi vrednost žiroskopa.</p>''',
- '''<p><code>robot.gyro_sensor_measure()</code>.</p>'''],
- 'ifTouch':['''<p>Preveri, če je stikalo pritisnjeno.</p>''',
- '''<p><code>if robot.touch_sensor_measure():</code>.</p>'''],
- 'lrPower':['''<p>Za obrat na mestu se morata kolesi vrteti z enako močjo in v nasprotni smeri.</p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', lr_power=[hitrost, -hitrost], ... )</code>.</p>'''],
- 'moveTank':['''<p>Robot naj se obrne na mestu.</p>''',
- '''<p>Najprimernejša metoda za to je <code>move_tank</code></p>'''],
- 'while':['''<p>Program naj teče v neskončni zanki.</p>''',
- '''<p><code>while 1:</code></p>'''],
-}
diff --git a/robot/problems/introduction/spotturn90/common.py~ b/robot/problems/introduction/spotturn90/common.py~
deleted file mode 100644
index d024bd4..0000000
--- a/robot/problems/introduction/spotturn90/common.py~
+++ /dev/null
@@ -1,61 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 214
-group = 'introduction'
-number = 3
-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_tank( 'on_for_seconds', lr_power=[20,-20], seconds=.9 )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveTank': Hint('moveTank'),
- 'onForSeconds': Hint('onForSeconds'),
- 'lrPower': Hint('lrPower'),
- 'seconds': Hint('seconds'),
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['move_tank']):
- return [{'id': 'moveTank'}]
-
- if not has_token_sequence(tokens, ['on_for_seconds']):
- return [{'id': 'onForSeconds'}]
-
- if not has_token_sequence(tokens, ['lr_power']):
- return [{'id': 'lrPower'}]
-
- if not has_token_sequence(tokens, ['seconds']):
- return [{'id': 'seconds'}]
-
- return None
diff --git a/robot/problems/introduction/spotturn90/sl.py~ b/robot/problems/introduction/spotturn90/sl.py~
deleted file mode 100644
index bc0978c..0000000
--- a/robot/problems/introduction/spotturn90/sl.py~
+++ /dev/null
@@ -1,24 +0,0 @@
-# coding=utf-8
-import server
-mod = server.problems.load_language('python', 'sl')
-
-id = 214
-name = 'Obrat na mestu 90'
-slug = 'Obrat na mestu 90'
-
-description = '''\
-<p>Robot naj se na mestu obrne za 90 stopinj v desno.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveTank':['''<p>Robot naj se obrne na mestu.</p>''',
- '''<p>Najprimernejša metoda za to je <code>move_tank</code></p>'''],
- 'onForSeconds':['''<p>Prvi argument metode <code>robot.move_tank</code> naj pove, da bo delovanje motorjev časovno omejeno.</p>''',
- '''<p><code>robot.move_tank('on_for_seconds', ... )</code>.</p>'''],
- 'lrPower':['''<p>Za obrat na mestu se morata kolesi vrteti z enako močjo in v nasprotni smeri.</p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', lr_power=[hitrost, -hitrost], ... )</code>.</p>'''],
- 'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', ..., seconds=... )</code>.</p>'''],
-} \ No newline at end of file
diff --git a/robot/problems/introduction/square20/common.py~ b/robot/problems/introduction/square20/common.py~
deleted file mode 100644
index f868a1c..0000000
--- a/robot/problems/introduction/square20/common.py~
+++ /dev/null
@@ -1,76 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 213
-group = 'introduction'
-number = 4
-visible = True
-
-solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-
-turntime = .95
-robot.move_steering( 'on_for_seconds', direction=0, power=20, seconds=2 )
-robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=turntime )
-robot.move_steering( 'on_for_seconds', direction=0, power=20, seconds=2 )
-robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=turntime )
-robot.move_steering( 'on_for_seconds', direction=0, power=20, seconds=2 )
-robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=turntime )
-robot.move_steering( 'on_for_seconds', direction=0, power=20, seconds=2 )
-robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=turntime )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteering': Hint('moveSteering'),
- 'onForSeconds': Hint('onForSeconds'),
- 'direction': Hint('direction'),
- 'seconds': Hint('seconds'),
- 'moveTank': Hint('moveTank'),
- 'lrPower': Hint('lrPower')
-}
-
-def hint( code):
- tokens = get_tokens(code)
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not has_token_sequence(tokens, ['move_steering']):
- return [{'id': 'moveSteering'}]
-
- if not 'on_for_seconds' in code:
- return [{'id': 'onForSeconds'}]
-
- if not 'direction' in code:
- return [{'id': 'direction'}]
-
- if not 'seconds' in code:
- return [{'id': 'seconds'}]
-
- if not has_token_sequence(tokens, ['move_tank']):
- return [{'id': 'moveTank'}]
-
- if not 'lr_power' in code:
- return [{'id': 'lrPower'}]
-
- return None
diff --git a/robot/problems/introduction/square20/sl.py~ b/robot/problems/introduction/square20/sl.py~
deleted file mode 100644
index aa5137e..0000000
--- a/robot/problems/introduction/square20/sl.py~
+++ /dev/null
@@ -1,27 +0,0 @@
-# coding=utf-8
-
-name = 'Kvadrat 20 cm'
-slug = 'Kvadrat 20 cm'
-
-description = '''\
-<p>Robot naj enkrat prevozi kvadrat s stranico 20 cm.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu moramo priključiti levi motor: <code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu moramo priključiti desni motor: <code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteering':['''<p>Sinhroniziraj motorja in ju zaženi.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( ... )</code>.</p>'''],
- 'onForSeconds':['''<p>Prvi argument metode <code>robot.move_steering</code> naj pove, da bo delovanje motorjev časovno omejeno.</p>''',
- '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''],
- 'direction':['''<p>Navedi smer premikanja motorjev, naravnost = 0.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, ... )</code>.</p>'''],
- 'seconds':['''<p>Napiši časovno omejitev v sekundah.</p>''',
- '''<p><code>robot.move_steering( 'on_for_seconds', direction=0, seconds=... )</code>.</p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=.95 )</code>.</p>''',],
- 'moveTank': ['''<p>Robot naj se obrne na mestu.</p>''',
- '''<p>Najprimernejša metoda za to je <code>move_tank</code></p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', ... )</code>.</p>'''],
- 'lrPower': ['''<p>Za obrat na mestu se morata kolesi vrteti z enako močjo in v nasprotni smeri.</p>''',
- '''<p><code>robot.move_tank( 'on_for_seconds', lr_power=[20,-20], seconds=.95 )</code>.</p>'''],
-}
diff --git a/robot/problems/introduction/wall1m/common.py~ b/robot/problems/introduction/wall1m/common.py~
deleted file mode 100644
index 319cea2..0000000
--- a/robot/problems/introduction/wall1m/common.py~
+++ /dev/null
@@ -1,80 +0,0 @@
-# coding=utf-8
-
-from python.util import has_token_sequence, string_almost_equal, \
- string_contains_number, get_tokens, get_numbers, get_exception_desc
-from server.hints import Hint, HintSequence
-
-id = 215
-group = 'introduction'
-number = 6
-visible = True
-
-solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-robot.connect_sensor( 'ultrasonic' )
-robot.move_steering( 'on', power=80 )
-while robot.ultrasonic_sensor_measure( 'distance-cm' ) > 500:
- pass
-robot.move_steering( 'on', power=20 )
-while robot.ultrasonic_sensor_measure( 'distance-cm' ) > 200:
- pass
-robot.move_steering( 'off' )
-'''
-
-hint_type = {
- 'mW_init': Hint('mW_init'),
- 'connectMotorLeft': Hint('connectMotorLeft'),
- 'connectMotorRight': Hint('connectMotorRight'),
- 'moveSteeringOn': Hint('moveSteeringOn'),
- 'moveSteeringOff': Hint('moveSteeringOff'),
- 'connectUltrasonicSensor': Hint('connectUltrasonicSensor'),
- 'ultrasonicSensorMeasure': Hint('ultrasonicSensorMeasure'),
- 'power80': Hint('power80'),
- 'power20': Hint('power20'),
- 'while': Hint('while')
-}
-
-def hint( code ):
- tokens = get_tokens(code)
- lines = code.split('\n')
-
- # if code does not include mindstorms_widgets(), a student gets a hint that the robot should be somehow represented in the program
- if not has_token_sequence(tokens, ['mindstorms_widgets', '(',')']):
- return [{'id': 'mW_init'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['left']):
- return [{'id': 'connectMotorLeft'}]
-
- # if code does not include connect_motor statement, a student needs to learn about how to connect the motors
- if not has_token_sequence(tokens, ['connect_motor']) and not has_token_sequence(tokens, ['right']):
- return [{'id': 'connectMotorRight'}]
-
- if not (has_token_sequence(tokens, ['connect_sensor', '(']) and 'ultrasonic' in code) :
- return [{'id': 'connectUltrasonicSensor'}]
-
- if not (has_token_sequence(tokens, ['move_steering', '(']) and 'on' in code):
- return [{'id': 'moveSteeringOn'}]
-
- if not (has_token_sequence(tokens, ['move_steering', '(']) and 'off' in code):
- return [{'id': 'moveSteeringOff'}]
-
- #if not (has_token_sequence(tokens, ['ultrasonic_sensor_measure', '(']) and 'distance-cm' in code):
- if not any(('ultrasonic_sensor_measure' in s and '(' in s and 'distance-cm' in s) for s in lines)
- return [{'id': 'ultrasonicSensorMeasure'}]
-
- if not any(('power' in s and '80' in s and '=' in s) for s in lines):
- return [{'id': 'power80'}]
-
- if not any(('power' in s and '20' in s and '=' in s) for s in lines):
- return [{'id': 'power20'}]
-
- if not has_token_sequence(tokens, ['while']):
- return [{'id': 'while'}]
-
- return None
diff --git a/robot/problems/introduction/wall1m/naloga06_wall1m.py~ b/robot/problems/introduction/wall1m/naloga06_wall1m.py~
deleted file mode 100644
index f7e6bad..0000000
--- a/robot/problems/introduction/wall1m/naloga06_wall1m.py~
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/python
-# coding=utf-8
-
-print """
-Naloga 6:
- Robota postavi pred zid, tako da bo od njega oddaljen vsaj 1 m; vmes naj ne bo ovir.
- Napisi program, s katerim bo robot vozil naravnost proti zidu z 80% mocjo.
- Na razdalji 50 cm od zida naj robot zmanjsa hitrost na 20%, na razdalji 20 cm od zida pa naj se ustavi.
-"""
-
-import time
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
-us = ultrasonic_sensor(); assert us.connected
-us.mode = 'US-DIST-CM' # Continuous measurement of distance (0-2550 mm)
-
-# for m in us.modes:
-# print "\t",m
-#exit()
-robot = mindstorms_widgets()
-robot.connect_motor( 'left' )
-robot.connect_motor( 'right' )
-
-robot.move_steering( 'on', power=80 )
-while us.value()>500:
- pass
-robot.move_steering( 'on', power=20 )
-while us.value()>200:
- pass
-robot.move_steering( 'off' )
diff --git a/robot/problems/introduction/wall1m/sl.py~ b/robot/problems/introduction/wall1m/sl.py~
deleted file mode 100644
index 8455bab..0000000
--- a/robot/problems/introduction/wall1m/sl.py~
+++ /dev/null
@@ -1,31 +0,0 @@
-# coding=utf-8
-
-name = 'Pelji do zida'
-slug = 'Pelji do zida'
-
-description = '''\
-<p>Robota postavi pred zid, tako da bo od njega oddaljen vsaj 1 m; vmes naj ne bo ovir.
- Napisi program, s katerim bo robot vozil naravnost proti zidu z 80% mocjo.
- Na razdalji 50 cm od zida naj robot zmanjsa hitrost na 20%, na razdalji 20 cm od zida pa naj se ustavi.</p>'''
-
-hint = {
- 'mW_init':['''<p>Robota v programu predstavimo z mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
- 'connectMotorLeft':['''<p>Robotu priključi levi motor</p>''',
- '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
- 'connectMotorRight':['''<p>Robotu priključi desni motor</p>''',
- '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
- 'moveSteeringOn':['''<p>Sinhroniziraj motorja in ju zaženi.</p>''',
- '''<p>Za sinhronizirano vožnjo je najbolj primerna metoda <code>robot.move_steering( 'on' )</code>.</p>'''],
- 'moveSteeringOff':['''<p>Ustavi motorja.</p>''',
- '''<p><code>robot.move_steering( 'off' )</code>.</p>'''],
- 'power80': ['''<p>Nastavi moč motorjev na 80%.</p>''',
- '''<p><code>robot.move_steering( 'on', power=80 )</code>.</p>'''],
- 'power20': ['''<p>Nastavi moč motorjev na 20%.</p>''',
- '''<p><code>robot.move_steering( 'on', power=20 )</code>.</p>'''],
- 'connectUltrasonicSensor':['''<p>Robotu moramo priključiti ultrazvočni senzor.</p>''',
- '''<p><code>robot.connect_sensor( 'ultrasonic' )</code>.</p>'''],
- 'ultrasonicSensorMeasure':['''<p>Medtem ko se robot pomika naprej, naj uporabi ultrazvočni senzor v načinu 'distance-cm', s katerim meri razdaljo v cm.</p>''',
- '''<p><code>robot.ultrasonic_sensor_measure( 'distance-cm' )</code>.</p>'''],
- 'while':['''<p>Uporabi zanko: robot naj se pelje naprej, dokler ne pride do razdalje 50 cm od zida.</p>''',
- '''<p>Uporabi še eno zanko: robot naj se pelje naprej z 20% močjo, dokler ne pride do razdalje 20 cm od zida.</p>'''],
-}