forked from tdwojak/Python2017
Update 'labs02/task10.py'
This commit is contained in:
parent
7934874c58
commit
f43122f338
@ -9,9 +9,17 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||
|
||||
|
||||
def pokemon_speak(text):
|
||||
i=0
|
||||
res=""
|
||||
for s in text:
|
||||
if i%2==0:
|
||||
res += s.upper()
|
||||
else:
|
||||
res+= s
|
||||
i=i+1
|
||||
return res
|
||||
pass
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
||||
outputs = ['PoKeMoN', 'Do nOt wAnT', 'POKEMON']
|
||||
|
Loading…
Reference in New Issue
Block a user