forked from tdwojak/Python2017
done
This commit is contained in:
parent
ea8563517a
commit
a5ec56ec66
@ -9,7 +9,23 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
|||||||
|
|
||||||
|
|
||||||
def pokemon_speak(text):
|
def pokemon_speak(text):
|
||||||
pass
|
value = ''
|
||||||
|
b = True
|
||||||
|
for i in text:
|
||||||
|
value += i.upper() if b else i.lower()
|
||||||
|
b = not b
|
||||||
|
if i.isupper() == True:
|
||||||
|
return print(text)
|
||||||
|
else:
|
||||||
|
return print(value)
|
||||||
|
|
||||||
|
|
||||||
|
pokemon_speak('pokemon')
|
||||||
|
pokemon_speak('do not want')
|
||||||
|
pokemon_speak('POKEMON')
|
||||||
|
|
||||||
|
#DLACZEGO WYSWIETLA ERROR SKORO PROGRAM DZIALA PRAWIDLOWO ??????
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
|
Loading…
Reference in New Issue
Block a user