From 6dbe02d844b81d455dda3086fc0f212f7abdca06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Mon, 17 Oct 2016 12:31:13 +0200 Subject: Added an exercise on recursion. Added lecture notes for lists and for loop. --- python/problems/recursion/find_sum/sl.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 python/problems/recursion/find_sum/sl.py (limited to 'python/problems/recursion/find_sum/sl.py') diff --git a/python/problems/recursion/find_sum/sl.py b/python/problems/recursion/find_sum/sl.py new file mode 100644 index 0000000..00aad43 --- /dev/null +++ b/python/problems/recursion/find_sum/sl.py @@ -0,0 +1,28 @@ +import server +mod = server.problems.load_language('python', 'sl') + +id = 20809 +name = 'Išči vsoto' + +description = '''\ +

+Napiši funkcijo find_sum(xs, gs), ki kot argument prejme seznam +pozitivnih števil in število, ki predstavlja ciljno vsoto. Funkcija vrne +True, kadar lahko sestavimo ciljno vsoto iz števil v seznamu.

+ +
+>>> find_sum([2,7,3,1,4], 10)
+True
+>>> find_sum([2,3,2,4], 10)
+False
+
+''' + +plan = [] + +hint = { + 'final_hint': ['''\ +

Program je pravilen!
+

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