From fbba0900d56d5d692db8203b7153b170f756572e Mon Sep 17 00:00:00 2001 From: s45152 Date: Mon, 27 Nov 2017 15:21:16 +0100 Subject: [PATCH] Task07 completed - passed --- labs02/task07.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labs02/task07.py b/labs02/task07.py index 80cbd37..6145381 100644 --- a/labs02/task07.py +++ b/labs02/task07.py @@ -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"]]