diff --git a/bigrandom/answer.py b/bigrandom/answer.py index cb5fee4..3ddfd9d 100644 --- a/bigrandom/answer.py +++ b/bigrandom/answer.py @@ -8,9 +8,43 @@ 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 - +# <<<<<<< HEAD + data = open('data.txt','r') # your algorithm + line = "" + for char in data: + + for x in range(0,len(char)): + if (char[x]=='#'): + line = char[x+1:] + break + x+=1 + for y in line: + if (y=='#'): + noh+=1 + suc+=ord(y) + # i=0 + # while (line[0]!="#"): + + # for char in data.readline(): + # if (char=='#'): + # noh+=1 + # else: + # suc= suc+ ord(char) + # + # noh = noh-10000 + # suc = suc-orc(10000) return (noh,suc) - # add methods if you need more \ No newline at end of file + # add methods if you need more +big = BigRandom() +print (big.answer()) + + + # your algorithm + + # return (noh,suc) + + # add methods if you need more +# >>>>>>> 64e1f92e25e7147b206ac73695e846881e7f9b0d diff --git a/caesar/answer.py b/caesar/answer.py index 0d85db4..2b00f02 100644 --- a/caesar/answer.py +++ b/caesar/answer.py @@ -8,6 +8,21 @@ def answer(self): # your algorithm - return (key) - # add methods if you need more \ No newline at end of file + + # add methods if you need more + word = open(self.ciphertext,"r") + # text = open("apagitu.txt","w"); + + new="" + for x in word.read(): + i=0 + i=ord(str(x))-46 + if(i<0): + i=i+127 + new += chr(i) + # text.write(new) + print(new) + return (key) +ans = Caesar() +print (ans.answer())