From 12378810ee9207536bfa0c264c1bf2a2b0296171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Wed, 24 Aug 2016 15:32:22 +0200 Subject: Added several new exercises for Python (related to dictionaries and sets). --- python/problems/dictionaries/following_words/sl.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 python/problems/dictionaries/following_words/sl.py (limited to 'python/problems/dictionaries/following_words/sl.py') 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 = '''\ +

+Napišite funkcijo following_words(txt), ki za vsako besedo b +v nizu txt zgradi seznam besed, ki v tekstu nastopijo za +besedo b. Nekaj primerov: +

+>>> following_words('in in in in')
+{'in': ['in', 'in', 'in']}
+
+V besedilu se pojavi samo beseda in; beseda in se pojavi +na treh mestih za in. +
+>>> following_words('in to in ono in to smo mi')
+{'smo': ['mi'], 'to': ['in', 'smo'], 'ono': ['in'], 'in': ['to', 'ono', 'to']}
+
+Za besedo smo se pojavi samo beseda mi, medtem ko se +recimo za besedo to pojavita tako beseda smo kot +tudi beseda in. +

+''' + +plan = [] + +hint = { + 'final_hint': ['''\ +

Program je pravilen!
+

+'''], +} -- cgit v1.2.1