From b52078b610c3cceb8d63511fc65d45b4a85b22e4 Mon Sep 17 00:00:00 2001 From: s45147 Date: Mon, 20 Nov 2017 09:56:26 +0100 Subject: [PATCH] done --- labs02/task09.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/labs02/task09.py b/labs02/task09.py index 9045054..28b9c01 100644 --- a/labs02/task09.py +++ b/labs02/task09.py @@ -9,8 +9,16 @@ Np. leet('leet') powinno zwrócić '1337'. def leet_speak(text): - pass + slownik = {'e':3, 'l':1, 'o':0, 't':7} + dekod = '' + for znak in text: + if znak in slownik: + dekod += slownik[znak] + else: + dekod += znak + + return dekod def tests(f): inputs = [['leet'], ['do not want']]