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/grandchildren/sl.py | 33 ++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 python/problems/dictionaries/grandchildren/sl.py
(limited to 'python/problems/dictionaries/grandchildren/sl.py')
diff --git a/python/problems/dictionaries/grandchildren/sl.py b/python/problems/dictionaries/grandchildren/sl.py
new file mode 100644
index 0000000..b24c315
--- /dev/null
+++ b/python/problems/dictionaries/grandchildren/sl.py
@@ -0,0 +1,33 @@
+import server
+mod = server.problems.load_language('python', 'sl')
+
+
+id = 20608
+name = 'Vnuki (družinsko drevo 3)'
+
+description = '''\
+
+Napišite funkcijo grandchildren(tree, name)
, ki v družinskem drevesu tree
+vrne seznam vseh vnukov in vnukinj osebe. V primeru, da oseba nima vnukov, vrnite prazen seznam.
+
+
+
+Družinsko drevo tree
je slovar, kjer ključi predstavljajo imena
+staršev, vrednosti pa so njihovi otroci. Primer iz prejšnje naloge:
+
+>>> tree = {'renee': ['rob', 'bob'], 'ken': ['suzan'], 'rob': ['jim'],
+ 'sid': ['rob', 'bob'], ... , 'bob': ['mary', 'tom', 'judy']}
+>>> grandchildren(tree, 'renee')
+['jim', 'mary', 'tom', 'judy']
+
+
+'''
+
+plan = []
+
+hint = {
+ 'final_hint': ['''\
+Program je pravilen!
+
+'''],
+}
--
cgit v1.2.1