summaryrefslogtreecommitdiff
path: root/python/problems/dictionaries/following_words/sl.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/dictionaries/following_words/sl.py')
-rw-r--r--python/problems/dictionaries/following_words/sl.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/python/problems/dictionaries/following_words/sl.py b/python/problems/dictionaries/following_words/sl.py
new file mode 100644
index 0000000..b9d6740
--- /dev/null
+++ b/python/problems/dictionaries/following_words/sl.py
@@ -0,0 +1,36 @@
+import server
+mod = server.problems.load_language('python', 'sl')
+
+
+id = 20610
+name = 'Sledeče besede'
+
+description = '''\
+<p>
+Napišite funkcijo <code>following_words(txt)</code>, ki za vsako besedo <code>b</code>
+v nizu <code>txt</code> zgradi seznam besed, ki v tekstu nastopijo za
+besedo <code>b</code>. Nekaj primerov:
+<pre>
+>>> following_words('in in in in')
+{'in': ['in', 'in', 'in']}
+</pre>
+V besedilu se pojavi samo beseda <code>in</code>; beseda <code>in</code> se pojavi
+na treh mestih za <code>in</code>.
+<pre>
+>>> following_words('in to in ono in to smo mi')
+{'smo': ['mi'], 'to': ['in', 'smo'], 'ono': ['in'], 'in': ['to', 'ono', 'to']}
+</pre>
+Za besedo <code>smo</code> se pojavi samo beseda <code>mi</code>, medtem ko se
+recimo za besedo <code>to</code> pojavita tako beseda <code>smo</code> kot
+tudi beseda <code>in</code>.
+</p>
+'''
+
+plan = []
+
+hint = {
+ 'final_hint': ['''\
+<p>Program je pravilen! <br>
+</p>
+'''],
+}