forked from tdwojak/Python2018
task10, task11, test_task done
This commit is contained in:
parent
b1a003874e
commit
73ec835b5e
@ -9,7 +9,18 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
|
||||
|
||||
|
||||
def pokemon_speak(text):
|
||||
pass
|
||||
w = ''
|
||||
for i in range(len(text)):
|
||||
if i % 2 == 0:
|
||||
w += text[i].upper()
|
||||
else:
|
||||
w += text[i]
|
||||
#print w
|
||||
return w
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def tests(f):
|
||||
|
@ -9,7 +9,17 @@ Oba napisy będą składać się wyłacznie z małych liter.
|
||||
"""
|
||||
|
||||
def common_chars(string1, string2):
|
||||
pass
|
||||
lista = []
|
||||
for a in range(97,123,1):
|
||||
if chr(a) in string1 and chr(a) in string2:
|
||||
lista.append(chr(a))
|
||||
print lista
|
||||
return lista
|
||||
|
||||
|
||||
#print(cmp(string1, string2))
|
||||
#ord(string2)
|
||||
print(ord('a'), 'do', ord('z'))
|
||||
|
||||
|
||||
def tests(f):
|
||||
|
@ -6,7 +6,7 @@ def suma(a, b):
|
||||
"""
|
||||
Napisz funkcję, która zwraca sumę elementów.
|
||||
"""
|
||||
return 0
|
||||
return a + b
|
||||
|
||||
def tests(f):
|
||||
inputs = [(2, 3), (0, 0), (1, 1)]
|
||||
|
Loading…
Reference in New Issue
Block a user