From bac748992fb54cd8066f0b1c011cbd69de909a32 Mon Sep 17 00:00:00 2001 From: "wagner.agnieszka" Date: Fri, 1 Jun 2018 19:28:21 +0200 Subject: [PATCH] passed --- labs02/task09.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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']]