From 6f1df508bd5d09c62eb735a46e3e0127ff7815fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Tue, 3 Nov 2015 12:31:28 +0100 Subject: Added plan to similarity problem. --- .../problems/functions_and_modules/similarity/sl.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'python/problems/functions_and_modules') diff --git a/python/problems/functions_and_modules/similarity/sl.py b/python/problems/functions_and_modules/similarity/sl.py index 8aaf0b0..d3bb95c 100644 --- a/python/problems/functions_and_modules/similarity/sl.py +++ b/python/problems/functions_and_modules/similarity/sl.py @@ -25,11 +25,25 @@ robot

''' +range_for = ['''\ +

S for prehodi vse indekse in na vsakem koraku primerjaj ali sta +črki (pri trenutnem indeksu) enaki.

''', + '''\ +

Zanka s for:

+
+for i in range(min(len(s1), len(s2))):
+
'''] + plan = ['''\ -

-''', +

Naloge se lahko lotiš na dva načina: 1) z zip ustvariš pare +soležnih elementov, ali 2) uporabiš funkcijo range in primerjaš po indeksih.

''', '''\ -

'''] +

Zanka z zip:

+
+for v1, v2 in zip(s1, s2):
+
''', + range_for] + hint = { 'final_hint': ['''\ -- cgit v1.2.1