forked from tdwojak/Python2017
z1, z2, z3, z4, z5, z6, z7, z8, z9, z10
This commit is contained in:
parent
181d55ab25
commit
f29a32cacd
@ -9,11 +9,19 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||
|
||||
|
||||
def pokemon_speak(text):
|
||||
pass
|
||||
res = ""
|
||||
c = 1
|
||||
for i in text:
|
||||
if c%2 == 0:
|
||||
res += i
|
||||
else:
|
||||
res += i.upper()
|
||||
c += 1
|
||||
return res
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [['pokemon'], ['do not want'], 'POKEMON']
|
||||
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
||||
outputs = ['PoKeMoN', 'Do nOt wAnT', 'POKEMON']
|
||||
|
||||
for input, output in zip(inputs, outputs):
|
||||
|
Loading…
Reference in New Issue
Block a user