z1, z2, z3, z4, z5, z6, z7
This commit is contained in:
parent
2956c1c3e0
commit
fb735b9d88
@ -6,7 +6,10 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
|
||||
sumę kodów ASCII znaków.
|
||||
"""
|
||||
def char_sum(text):
|
||||
pass
|
||||
res = 0
|
||||
for i in text:
|
||||
res += ord(i)
|
||||
return res
|
||||
|
||||
def tests(f):
|
||||
inputs = [["this is a string"], ["this is another string"]]
|
||||
|
Loading…
Reference in New Issue
Block a user