1
0
Fork 0
This commit is contained in:
s45147 2017-11-20 09:36:10 +01:00
parent c6901ebfc2
commit 7cc01637fb
1 changed files with 4 additions and 1 deletions

View File

@ -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
suma = 0
for c in text:
suma += ord(c)
return suma
def tests(f):
inputs = [["this is a string"], ["this is another string"]]