From 4cdea335b0951e3c12dfb7b906f958d6b5be25c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Mon, 28 Dec 2015 10:22:31 +0100 Subject: New plans for palindromic numbers. --- .../problems/functions/palindromic_numbers/sl.py | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'python/problems/functions/palindromic_numbers') diff --git a/python/problems/functions/palindromic_numbers/sl.py b/python/problems/functions/palindromic_numbers/sl.py index 8d64bab..0ba6b2e 100644 --- a/python/problems/functions/palindromic_numbers/sl.py +++ b/python/problems/functions/palindromic_numbers/sl.py @@ -17,11 +17,29 @@ ki ga lahko dobimo kot produkt dveh tromestnih števil. Vir: Project Euler, Problem 4.

''' -plan = ['''\ -

-''', +num_to_str = [ '''\ -

'''] +

Ali je niz palindrom, že znamo ugotoviti. To smo se naučili pri prejšnji nalogi.

''', + '''\ +

Kako bi spremenil število v niz?

''', + '''\ + +niz = str(stevilo) +'''] + +double_loop = [ + '''\ +

Preizkusiti moraš produkte vseh kombinacij tromestnih števil.

''', + '''\ +

Potrebna bo dvojna zanka.

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