diff --git a/bigrandom/answer.py b/bigrandom/answer.py index cb5fee4..66b5bd1 100644 --- a/bigrandom/answer.py +++ b/bigrandom/answer.py @@ -8,9 +8,21 @@ def answer(self): # ommiting line number's hashtag suc = 0 # variable to store sum of character's code in ascii, # ommiting line number and its hashtag - + data = open(self.data, 'r') + l = data.readline() # your algorithm + for line in data: + for ch in line: + suc += ord(ch) + if ch == '#': + noh += 1 + noh -= 1 + data.close() return (noh,suc) - # add methods if you need more \ No newline at end of file +ans = BigRandom() +noh, suc = ans.answer() + +print('NOH: ' + str(noh)) +print('SUC: ' + str(suc)) diff --git a/caesar/answer.py b/caesar/answer.py index 0d85db4..d074d58 100644 --- a/caesar/answer.py +++ b/caesar/answer.py @@ -10,4 +10,4 @@ def answer(self): return (key) - # add methods if you need more \ No newline at end of file + # add methods if you need more