https://git.wmi.amu.edu.pl/tdwojak/Python2017/src/master/labs03 #1
@ -5,8 +5,9 @@
|
||||
Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
|
||||
sumę kodów ASCII znaków.
|
||||
"""
|
||||
|
||||
def char_sum(text):
|
||||
pass
|
||||
return sum(ord(i) for i in text)
|
||||
|
||||
def tests(f):
|
||||
inputs = [["this is a string"], ["this is another string"]]
|
||||
|
Loading…
Reference in New Issue
Block a user