forked from tdwojak/Python2017
Resolved
This commit is contained in:
parent
2438b456f4
commit
9115943f9c
@ -6,7 +6,10 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
|
|||||||
sumę kodów ASCII znaków.
|
sumę kodów ASCII znaków.
|
||||||
"""
|
"""
|
||||||
def char_sum(text):
|
def char_sum(text):
|
||||||
pass
|
results=0
|
||||||
|
for letter in text:
|
||||||
|
results+=ord(letter)
|
||||||
|
return results
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [["this is a string"], ["this is another string"]]
|
inputs = [["this is a string"], ["this is another string"]]
|
||||||
|
Loading…
Reference in New Issue
Block a user