From 7e3c3602f1c1619fc1666bc2a21179530a99f3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Mon, 28 Dec 2015 10:59:12 +0100 Subject: Added basic plans to three problems. --- python/problems/functions/divisors/sl.py | 15 ++++++++++++++- python/problems/functions/divisors_sum/sl.py | 4 +++- python/problems/functions/palindromic_numbers/sl.py | 6 +++--- 3 files changed, 20 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/problems/functions/divisors/sl.py b/python/problems/functions/divisors/sl.py index f0e25c4..b4f0070 100644 --- a/python/problems/functions/divisors/sl.py +++ b/python/problems/functions/divisors/sl.py @@ -12,7 +12,20 @@ description = '''\

Napiši funkcijo divisors(n), ki izpiše vse delitelje števila (brez samega sebe), ki ga vnese uporabnik.

''' -plan = [] +div_modulo = [ + '''\ +

Število a deli število b, če je ostanek +pri deljenju števil enak 0.

''', + '''\ +
+if b % a == 0: 
+
'''] + +plan = [ + '''\ +

Za vsa cela števila, ki so manjša od n, preveri, +če delijo n. Če delijo, jih izpiši.

''', + div_modulo] hint = { 'final_hint': ['''\ diff --git a/python/problems/functions/divisors_sum/sl.py b/python/problems/functions/divisors_sum/sl.py index 31cd369..f06b1dd 100644 --- a/python/problems/functions/divisors_sum/sl.py +++ b/python/problems/functions/divisors_sum/sl.py @@ -13,7 +13,9 @@ description = '''\ Napiši funkcijo divisors_sum(n), ki vrne vsoto vseh deliteljev števila, ki ga vnese uporabnik.

''' -plan = [] +plan = ['''\ +

Ideja je ista kot pri izpisu vseh deliteljev. Tu števil ne +izpisujemo, temveč jih prištevamo vsoti in vsoto na koncu vrnemo.

'''] hint = { 'final_hint': ['''\ diff --git a/python/problems/functions/palindromic_numbers/sl.py b/python/problems/functions/palindromic_numbers/sl.py index 0ba6b2e..fef1d96 100644 --- a/python/problems/functions/palindromic_numbers/sl.py +++ b/python/problems/functions/palindromic_numbers/sl.py @@ -31,12 +31,12 @@ double_loop = [ '''\

Preizkusiti moraš produkte vseh kombinacij tromestnih števil.

''', '''\ -

Potrebna bo dvojna zanka.

''', +

Potrebna bo dvojna zanka...

''', '''\ - +
 for st1 in range(100, 1000):
     for st2 in range(100, 1000):
-''']
+
'''] plan = [num_to_str, double_loop] -- cgit v1.2.1