From 8e45dba2e5744276986e3fb8a3d2de36c167d880 Mon Sep 17 00:00:00 2001 From: "wagner.agnieszka" Date: Fri, 1 Jun 2018 17:32:25 +0200 Subject: [PATCH] passed --- labs02/task07.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/labs02/task07.py b/labs02/task07.py index 80cbd37..5cf4520 100644 --- a/labs02/task07.py +++ b/labs02/task07.py @@ -6,7 +6,10 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca sumę kodów ASCII znaków. """ def char_sum(text): - pass + x = 0 + for c in text: + x += ord(c) + return (x) def tests(f): inputs = [["this is a string"], ["this is another string"]]