forked from tdwojak/Python2017
Task01 - completed
This commit is contained in:
parent
63ec76bae3
commit
d64ce2e49b
@ -7,11 +7,10 @@ Napisz funkcję pokemon_speak, która zamienia w podanym napisie co drugą liter
|
|||||||
na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def pokemon_speak(text):
|
def pokemon_speak(text):
|
||||||
text = list(text)
|
text = list(text)
|
||||||
for i, ele in enumerate(text):
|
for i, ele in enumerate(text):
|
||||||
if i % 2:
|
if i % 2 == 0:
|
||||||
text[i] = ele.upper()
|
text[i] = ele.upper()
|
||||||
return ("".join(text))
|
return ("".join(text))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user