summaryrefslogtreecommitdiff
path: root/python/problems/functions_and_modules/all/sl.py
diff options
context:
space:
mode:
authorMartin <martin@leo.fri1.uni-lj.si>2015-10-09 11:17:49 +0200
committerMartin <martin@leo.fri1.uni-lj.si>2015-10-09 11:17:49 +0200
commit84f3426c937d1bb9d44ba25a71706416fbb8b85d (patch)
tree84b064c8150b6bbd3422fb2c91c6121e0a01902c /python/problems/functions_and_modules/all/sl.py
parent45474b5c8cefa916aeb64e1c15a79f647a86d58c (diff)
Added several new problems.
They have no tests nor hints implemented.
Diffstat (limited to 'python/problems/functions_and_modules/all/sl.py')
-rw-r--r--python/problems/functions_and_modules/all/sl.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/python/problems/functions_and_modules/all/sl.py b/python/problems/functions_and_modules/all/sl.py
new file mode 100644
index 0000000..f71fa4b
--- /dev/null
+++ b/python/problems/functions_and_modules/all/sl.py
@@ -0,0 +1,40 @@
+# coding=utf-8
+import server
+mod = server.problems.load_language('python', 'sl')
+
+
+id = 238
+name = 'Vsi'
+slug = 'Vsi'
+
+
+description = '''\
+<p>
+Napišite funkcijo <code>all</code>, ki sprejme seznam <code>xs</code> in vrne <code>True</code>,
+če so vse vrednosti v seznamu resnične. Elementi seznama <code>xs</code> so lahko poljubnega tipa, ne le <code>bool</code>.
+<pre>
+>>> all([True, True, False])
+False
+>>> all([True, True])
+True
+>>> all([1, 2, 3, 0])
+False
+>>> all(['foo', 42, True])
+True
+>>> all([])
+True
+</pre>
+</p>'''
+
+plan = ['''\
+<p></p>
+''',
+ '''\
+<p></p>''']
+
+hint = {
+ 'final_hint': ['''\
+<p>Program je pravilen! <br>
+</p>
+'''],
+}