forked from tdwojak/Python2017
Task07 completed - passed
This commit is contained in:
parent
f4f28c0551
commit
fbba0900d5
@ -6,7 +6,9 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
|
||||
sumę kodów ASCII znaków.
|
||||
"""
|
||||
def char_sum(text):
|
||||
pass
|
||||
list_string = [ord(i) for i in text]
|
||||
suma = sum(list_string)
|
||||
return(suma)
|
||||
|
||||
def tests(f):
|
||||
inputs = [["this is a string"], ["this is another string"]]
|
||||
|
Loading…
Reference in New Issue
Block a user