summaryrefslogtreecommitdiff
path: root/python/problems/lists_and_for/substrings
diff options
context:
space:
mode:
authorMartin Možina <martin.mozina@fri.uni-lj.si>2015-10-18 19:21:12 +0200
committerMartin Možina <martin.mozina@fri.uni-lj.si>2015-10-18 19:21:12 +0200
commit7dd2b4dc917fe26267c1db1f5f58585a5417cb8c (patch)
tree8f3ff2c5bbba035868295a3d63ed1fbf7b856056 /python/problems/lists_and_for/substrings
parent531bde7a2fe3d643e9b6ffe690405b6cc07c4964 (diff)
Added some plans to some problems.
Diffstat (limited to 'python/problems/lists_and_for/substrings')
-rw-r--r--python/problems/lists_and_for/substrings/sl.py41
1 files changed, 39 insertions, 2 deletions
diff --git a/python/problems/lists_and_for/substrings/sl.py b/python/problems/lists_and_for/substrings/sl.py
index 595aee8..6bf56bf 100644
--- a/python/problems/lists_and_for/substrings/sl.py
+++ b/python/problems/lists_and_for/substrings/sl.py
@@ -19,11 +19,48 @@ Vrstni red naj bo točno tak kot ga prikazuje primer. Začnemo s praznim nizom,
nato pridejo na vrsto podnizi dolžine ena, dva, tri, ...
</p>'''
+
+substring = ['''\
+<p>Del niza oz. del seznama dobimo z rezanjem</p>
+''',
+ '''\
+<p>Za rezanje uporabi dvopičje</p>''',
+ '''\
+<pre>
+>>> s = "Rezanje"
+>>> s[:2]
+'Re'
+>>> s[2:]
+'zanje'
+>>> s[2:5]
+'zan'
+</pre>''']
+
plan = ['''\
-<p></p>
+<p>Potrebujemo dvojno zanko. </p>
''',
'''\
-<p></p>''']
+<p>Prva zanka gre po dolžini podniza, druga po začetku podniza. </p>''',
+ '''\
+<pre>
+naredi seznam s praznim podnizom
+Z zanko pojdi od 0 do dolžine niza:
+ z zanko pojdi od 0 do dolžine podniza
+ v seznam dodaj ustrezen podniz
+</pre>''',
+
+ '''\
+<p>Nov prazen seznam:</p>
+<pre>
+xs = []
+</pre>
+''',
+ '''\
+<p>Zanka od <code>0</code> do <code>n</code>:</p>
+<pre>
+for i in range(n):
+</pre>''',
+ substring]
hint = {
'final_hint': ['''\