summaryrefslogtreecommitdiff
path: root/python/problems/dictionaries/most_frequent/sl.py
diff options
context:
space:
mode:
authorMartin Možina <martin.mozina@fri.uni-lj.si>2016-08-24 15:32:22 +0200
committerMartin Možina <martin.mozina@fri.uni-lj.si>2016-08-24 15:32:22 +0200
commit12378810ee9207536bfa0c264c1bf2a2b0296171 (patch)
tree902e226e249a5369928e3fbc7e85739e14448b46 /python/problems/dictionaries/most_frequent/sl.py
parentc2e782122d52acea0e69f8a5a92b40bbbb7072e5 (diff)
Added several new exercises for Python (related to dictionaries and sets).
Diffstat (limited to 'python/problems/dictionaries/most_frequent/sl.py')
-rw-r--r--python/problems/dictionaries/most_frequent/sl.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/python/problems/dictionaries/most_frequent/sl.py b/python/problems/dictionaries/most_frequent/sl.py
new file mode 100644
index 0000000..c877e20
--- /dev/null
+++ b/python/problems/dictionaries/most_frequent/sl.py
@@ -0,0 +1,30 @@
+import server
+mod = server.problems.load_language('python', 'sl')
+
+
+id = 20604
+name = 'Najpogostejše'
+
+description = '''\
+<p>
+Napišite funkcijo <code>most_frequent(s)</code>, ki vrne besedo in znak,
+ki se v podanem nizu največkrat pojavita. V nizu
+<code>'in to in ono in to smo mi'</code> se največkrat pojavita beseda
+<code>'in'</code> in znak <code>' '</code> (presledek).
+<pre>
+>>> most_frequent('aa bb aa')
+('aa', 'a')
+>>> most_frequent('in to in ono in to smo mi')
+('in', ' ')
+</pre>
+</p>
+'''
+
+plan = []
+
+hint = {
+ 'final_hint': ['''\
+<p>Program je pravilen! <br>
+</p>
+'''],
+}