1
0
forked from tdwojak/Python2018
This commit is contained in:
s442188 2018-06-02 13:53:06 +02:00
parent 69e8d10aba
commit 659777d7b2

View File

@ -9,9 +9,14 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
def pokemon_speak(text): def pokemon_speak(text):
for i in text: lista = []
if i in text[::2]: for i in range(len(text)):
return i.upper() if i % 2 == 0:
lista.append(text[i].upper())
else:
lista.append(text[i])
return ''.join(lista)