summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/problems/functions/palindrome/sl.py6
-rw-r--r--python/problems/functions/palindromic_numbers/sl.py24
2 files changed, 28 insertions, 2 deletions
diff --git a/python/problems/functions/palindrome/sl.py b/python/problems/functions/palindrome/sl.py
index 9b064dd..9ddba0d 100644
--- a/python/problems/functions/palindrome/sl.py
+++ b/python/problems/functions/palindrome/sl.py
@@ -19,7 +19,11 @@ False
</pre>
</p>'''
-plan = []
+plan = ['''\
+<p>Niz je palindrom, če je enak obrnjenemu nizu. Kako bi obrnil niz?</p>
+''',
+ '''\
+<p>s[::-1]</p>''']
hint = {
'final_hint': ['''\
diff --git a/python/problems/functions/palindromic_numbers/sl.py b/python/problems/functions/palindromic_numbers/sl.py
index db9a062..0ba6b2e 100644
--- a/python/problems/functions/palindromic_numbers/sl.py
+++ b/python/problems/functions/palindromic_numbers/sl.py
@@ -17,7 +17,29 @@ ki ga lahko dobimo kot produkt dveh tromestnih števil.
Vir: Project Euler, <a href="http://projecteuler.net/index.php?section=problems&id=4">Problem 4</a>.
</p>'''
-plan = []
+num_to_str = [
+ '''\
+<p>Ali je niz palindrom, že znamo ugotoviti. To smo se naučili pri prejšnji nalogi.</p>''',
+ '''\
+<p>Kako bi spremenil število v niz?</p>''',
+ '''\
+<code>
+niz = str(stevilo)
+</code>''']
+
+double_loop = [
+ '''\
+<p>Preizkusiti moraš produkte vseh kombinacij tromestnih števil.</p>''',
+ '''\
+<p>Potrebna bo dvojna zanka.</p>''',
+ '''\
+<code>
+for st1 in range(100, 1000):
+ for st2 in range(100, 1000):
+</code>''']
+
+plan = [num_to_str,
+ double_loop]
hint = {
'final_hint': ['''\