1
0
Fork 0

z1, z2, z3, z4, z5, z6, z7, z8, z9, z10

This commit is contained in:
s45148 2017-11-29 00:37:01 +01:00
parent 181d55ab25
commit f29a32cacd
1 changed files with 11 additions and 3 deletions

View File

@ -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):