From 70554cf0130c44d08ffa48cb6d6885d07b808a2f Mon Sep 17 00:00:00 2001 From: s45147 Date: Mon, 20 Nov 2017 10:11:11 +0100 Subject: [PATCH] done --- labs02/task10.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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']]