forked from tdwojak/Python2017
Moje rozwiązanie
Signed-off-by: s45167 <krzysztof.spalinski@op.pl>
This commit is contained in:
parent
169b197614
commit
07e4742f4a
@ -10,13 +10,13 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
|||||||
## NIE WIEM CZEMU ŹLE??
|
## NIE WIEM CZEMU ŹLE??
|
||||||
|
|
||||||
def pokemon_speak(text):
|
def pokemon_speak(text):
|
||||||
s = ''
|
a = ''
|
||||||
for i in range(len(text)):
|
for i in range(len(text)):
|
||||||
if i % 2 == 0:
|
if i % 2 == 0:
|
||||||
s += text[i].upper()
|
a += text[i].upper()
|
||||||
else:
|
else:
|
||||||
s += text[i]
|
a += text[i]
|
||||||
return s
|
return a
|
||||||
|
|
||||||
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