1
0
forked from tdwojak/Python2018
This commit is contained in:
wagner.agnieszka 2018-06-01 18:38:11 +02:00
parent fd1d22ef4d
commit 6d503b377c
2 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,9 @@ Np. leet('leet') powinno zwrócić '1337'.
def leet_speak(text): def leet_speak(text):
pass for i in text :
if i == "e" :
def tests(f): def tests(f):

View File

@ -9,7 +9,13 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
def pokemon_speak(text): def pokemon_speak(text):
pass if text[:].isupper() == True :
return(text)
else :
R = [''] * len(text)
R[::2], R[1::2] = text[::2].upper(), text[1::2].lower()
R = ''.join(R)
return(R)
def tests(f): def tests(f):