1
0
Fork 0

commited tasks

This commit is contained in:
s45150 2017-11-26 14:03:31 +01:00
parent d64e3c0545
commit 32d82a2556
1 changed files with 6 additions and 2 deletions

View File

@ -7,8 +7,12 @@ sumę kodów ASCII znaków.
""" """
def char_sum(text): def char_sum(text):
sumaAsci = 0 sumaAsci = 0
for i in text text_tmp = str(text)
sumaAsci += sumaAsci(i) text_tmp=text_tmp.replace('[','')
text_tmp = text_tmp.replace(']', '')
text_tmp = text_tmp.replace("'", '')
for i in text_tmp:
sumaAsci += ord(i)
return sumaAsci return sumaAsci
def tests(f): def tests(f):