From 12378810ee9207536bfa0c264c1bf2a2b0296171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Wed, 24 Aug 2016 15:32:22 +0200 Subject: Added several new exercises for Python (related to dictionaries and sets). --- python/problems/dictionaries/max_characters/sl.py | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 python/problems/dictionaries/max_characters/sl.py (limited to 'python/problems/dictionaries/max_characters/sl.py') 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 = '''\ +

+Napiši funkcijo maxchars(words), 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 "MamA" 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 None. +

+
+>>> besede = ["RABarbara", "izpit", "zmagA"]
+>>> maxchars(besede)
+'izpit'
+'''
+
+plan = []
+
+hint = {
+    'final_hint': ['''\
+

Program je pravilen!
+

+'''], +} -- cgit v1.2.1