forked from tdwojak/Python2017
commited tasks
This commit is contained in:
parent
141caa611c
commit
2e77b2ed58
@ -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"]]
|
||||
|
Loading…
Reference in New Issue
Block a user