1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-11-25 15:19:18 +01:00
parent 141caa611c
commit 2e77b2ed58

View File

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