diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-10-18 19:21:12 +0200 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-10-18 19:21:12 +0200 |
commit | 7dd2b4dc917fe26267c1db1f5f58585a5417cb8c (patch) | |
tree | 8f3ff2c5bbba035868295a3d63ed1fbf7b856056 /python/problems/lists_and_for/prefix | |
parent | 531bde7a2fe3d643e9b6ffe690405b6cc07c4964 (diff) |
Added some plans to some problems.
Diffstat (limited to 'python/problems/lists_and_for/prefix')
-rw-r--r-- | python/problems/lists_and_for/prefix/sl.py | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/python/problems/lists_and_for/prefix/sl.py b/python/problems/lists_and_for/prefix/sl.py index 0a3d391..49a39c7 100644 --- a/python/problems/lists_and_for/prefix/sl.py +++ b/python/problems/lists_and_for/prefix/sl.py @@ -17,11 +17,45 @@ Vpiši besedo: drevo </pre> </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>Z zanko pojdi čez vse črke v besedi. Vsakič v seznam dodaj podniz od prvega znaka do trenutnega. </p> +''', + '''\ +<pre> +naredi prazen seznam +Z zanko pojdi od 0 do dolžine niza: + v seznam dodaj podniz (od prvega znaka do trenutnega) +</pre>''', + + '''\ +<p>Nov prazen seznam:</p> +<pre> +xs = [] +</pre> ''', '''\ -<p></p>'''] +<p>Zanka od <code>0</code> do <code>n</code>:</p> +<pre> +for i in range(n): +</pre>''', + substring] + hint = { 'final_hint': ['''\ |