1
0
Fork 0

rozwiazanie dom

This commit is contained in:
s407531 2018-05-13 10:07:40 +02:00
parent 4d6c11789d
commit 3445d715ab
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
sumę kodów ASCII znaków.
"""
def char_sum(text):
pass
sumujemy = 0
for znaki in text:
sumujemy = sumujemy + ord(znaki)
return sumujemy
def tests(f):
inputs = [["this is a string"], ["this is another string"]]