forked from tdwojak/Python2017
done
This commit is contained in:
parent
b52078b610
commit
70554cf013
@ -9,8 +9,16 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
|||||||
|
|
||||||
|
|
||||||
def pokemon_speak(text):
|
def pokemon_speak(text):
|
||||||
pass
|
wynik = ''
|
||||||
|
switch = 1
|
||||||
|
for znak in text:
|
||||||
|
if switch == 1:
|
||||||
|
wynik += znak.upper()
|
||||||
|
switch *= -1
|
||||||
|
else:
|
||||||
|
wynik += znak
|
||||||
|
switch *= -1
|
||||||
|
return wynik
|
||||||
|
|
||||||
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