forked from tdwojak/Python2018
Zaktualizuj 'labs02/task10.py'
This commit is contained in:
parent
af30735b0d
commit
4be2ec1074
@ -9,8 +9,16 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||
|
||||
|
||||
def pokemon_speak(text):
|
||||
pass
|
||||
listy = []
|
||||
|
||||
for i in range(len(text)):
|
||||
if i % 2 == 0:
|
||||
listy.append(text[i].upper())
|
||||
else:
|
||||
listy.append(text[i])
|
||||
|
||||
return ''.join(listy)
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
||||
@ -23,4 +31,4 @@ def tests(f):
|
||||
return "TESTS PASSED"
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(tests(pokemon_speak))
|
||||
print(tests(pokemon_speak))
|
Loading…
Reference in New Issue
Block a user