summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Možina <martin.mozina@fri.uni-lj.si>2015-11-03 12:31:28 +0100
committerMartin Možina <martin.mozina@fri.uni-lj.si>2015-11-03 12:31:28 +0100
commit6f1df508bd5d09c62eb735a46e3e0127ff7815fd (patch)
treec0e01a60bced36bd5daf9513c36a8953e736ce67
parent24822cf982fa19a6f70de06d2eefea65871a8bc7 (diff)
Added plan to similarity problem.
-rw-r--r--python/problems/functions_and_modules/similarity/sl.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/python/problems/functions_and_modules/similarity/sl.py b/python/problems/functions_and_modules/similarity/sl.py
index 8aaf0b0..d3bb95c 100644
--- a/python/problems/functions_and_modules/similarity/sl.py
+++ b/python/problems/functions_and_modules/similarity/sl.py
@@ -25,11 +25,25 @@ robot
</pre>
</p>'''
+range_for = ['''\
+<p>S <code>for</code> prehodi vse indekse in na vsakem koraku primerjaj ali sta
+črki (pri trenutnem indeksu) enaki.</p>''',
+ '''\
+<p>Zanka s <code>for</code>:</p>
+<pre>
+for i in range(min(len(s1), len(s2))):
+</pre>''']
+
plan = ['''\
-<p></p>
-''',
+<p>Naloge se lahko lotiš na dva načina: 1) z <code>zip</code> ustvariš pare
+soležnih elementov, ali 2) uporabiš funkcijo <code>range</code> in primerjaš po indeksih. </p>''',
'''\
-<p></p>''']
+<p>Zanka z <code>zip</code>: </p>
+<pre>
+for v1, v2 in zip(s1, s2):
+</pre>''',
+ range_for]
+
hint = {
'final_hint': ['''\