diff --git a/labs02/task09.py b/labs02/task09.py index 2f429b2..82ab67f 100644 --- a/labs02/task09.py +++ b/labs02/task09.py @@ -9,10 +9,15 @@ Np. leet('leet') powinno zwrócić '1337'. def leet_speak(text): - for i in text : - if i == "e" : - - + if 'e' in text : + text = text.replace("e", "3") + if "l" in text : + text = text.replace("l", "1") + if "o" in text : + text = text.replace("o", "0") + if "t" in text : + text = text.replace("t", "7") + return(text) def tests(f): inputs = [['leet'], ['do not want']]