diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2016-08-24 15:32:22 +0200 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2016-08-24 15:32:22 +0200 |
commit | 12378810ee9207536bfa0c264c1bf2a2b0296171 (patch) | |
tree | 902e226e249a5369928e3fbc7e85739e14448b46 /python/problems/dictionaries/max_characters/sl.py | |
parent | c2e782122d52acea0e69f8a5a92b40bbbb7072e5 (diff) |
Added several new exercises for Python (related to dictionaries and sets).
Diffstat (limited to 'python/problems/dictionaries/max_characters/sl.py')
-rw-r--r-- | python/problems/dictionaries/max_characters/sl.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/python/problems/dictionaries/max_characters/sl.py b/python/problems/dictionaries/max_characters/sl.py new file mode 100644 index 0000000..835c84f --- /dev/null +++ b/python/problems/dictionaries/max_characters/sl.py @@ -0,0 +1,29 @@ +import server +mod = server.problems.load_language('python', 'sl') + + +id = 20603 +name = 'Število znakov' + +description = '''\ +<p> +Napiši funkcijo <code>maxchars(words)</code>, ki kot argument prejme seznam nizov +in kot rezultat vrne niz, ki ima največ različnih znakov. Male in velike črke +upoštevaj kot iste znake - beseda <code>"MamA"</code> ima samo dva različna znaka. +Če obstaja več besed z enakim številom različnih znakov, naj vrne prvo med njimi. +Če je seznam prazen, naj funkcija vrne <code>None</code>. +</p> +<pre> +>>> besede = ["RABarbara", "izpit", "zmagA"] +>>> maxchars(besede) +'izpit' +''' + +plan = [] + +hint = { + 'final_hint': ['''\ +<p>Program je pravilen! <br> +</p> +'''], +} |