forked from tdwojak/Python2018
zadanie10
This commit is contained in:
parent
c5944a3f95
commit
493056edb6
@ -9,8 +9,12 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
|||||||
|
|
||||||
|
|
||||||
def pokemon_speak(text):
|
def pokemon_speak(text):
|
||||||
pass
|
|
||||||
|
|
||||||
|
for i in range(len(text)):
|
||||||
|
if ((i % 2) == 0):
|
||||||
|
text = text[:i] + (text[i].upper()) + text[i + 1:]
|
||||||
|
|
||||||
|
return text
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
||||||
|
Loading…
Reference in New Issue
Block a user