diff --git a/labs02/task10.py b/labs02/task10.py index 58d40d2..2bf4bc9 100644 --- a/labs02/task10.py +++ b/labs02/task10.py @@ -9,8 +9,16 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'. def pokemon_speak(text): - pass - + wynik = '' + switch = 1 + for znak in text: + if switch == 1: + wynik += znak.upper() + switch *= -1 + else: + wynik += znak + switch *= -1 + return wynik def tests(f): inputs = [['pokemon'], ['do not want'], ['POKEMON']]