forked from tdwojak/Python2018
zrobiono zadanie 10
This commit is contained in:
parent
586ba304cf
commit
8c082cfeb7
@ -9,8 +9,17 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||
|
||||
|
||||
def pokemon_speak(text):
|
||||
pass
|
||||
lista = list(text)
|
||||
wynik = []
|
||||
for slowa in range(len(lista)):
|
||||
if slowa % 2 == 0:
|
||||
wynik.append(lista[slowa].upper())
|
||||
|
||||
else:
|
||||
wynik.append(lista[slowa])
|
||||
|
||||
duze = "".join(wynik)
|
||||
return duze
|
||||
|
||||
def tests(f):
|
||||
inputs = [['pokemon'], ['do not want'], ['POKEMON']]
|
||||
@ -24,3 +33,4 @@ def tests(f):
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(tests(pokemon_speak))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user