diff --git a/.idea/internship-basic-gen3.iml b/.idea/internship-basic-gen3.iml new file mode 100644 index 0000000..6711606 --- /dev/null +++ b/.idea/internship-basic-gen3.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..15bd046 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..645787b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2ccfa6b --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1487684938016 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bigrandom/.idea/bigrandom.iml b/bigrandom/.idea/bigrandom.iml new file mode 100644 index 0000000..6711606 --- /dev/null +++ b/bigrandom/.idea/bigrandom.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/bigrandom/.idea/misc.xml b/bigrandom/.idea/misc.xml new file mode 100644 index 0000000..4d47c95 --- /dev/null +++ b/bigrandom/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/bigrandom/.idea/modules.xml b/bigrandom/.idea/modules.xml new file mode 100644 index 0000000..c3d5fa0 --- /dev/null +++ b/bigrandom/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/bigrandom/.idea/workspace.xml b/bigrandom/.idea/workspace.xml new file mode 100644 index 0000000..dec5cba --- /dev/null +++ b/bigrandom/.idea/workspace.xml @@ -0,0 +1,574 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1487682653361 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bigrandom/answer.py b/bigrandom/answer.py index cb5fee4..897b7e6 100644 --- a/bigrandom/answer.py +++ b/bigrandom/answer.py @@ -10,7 +10,20 @@ def answer(self): # ommiting line number and its hashtag # your algorithm - + d = open(self.data, "r") + for c in d: + for x in c: + c = c[1:] + if (x == "#"): + break + for x in c: + if (x == "#"): + noh += 1 + suc += ord(x) return (noh,suc) + +d = BigRandom() +print (d.answer()) + # add methods if you need more \ No newline at end of file diff --git a/caesar/answer.py b/caesar/answer.py index 0d85db4..4bfcaca 100644 --- a/caesar/answer.py +++ b/caesar/answer.py @@ -7,7 +7,17 @@ def answer(self): key = 0 # variable to store the key # your algorithm + a = open(self.ciphertext, "r") + b = "" + n = 0 + for x in a.read(): + n = ord(str(x))- key + if (n<0): + n += 127 + b += chr(n) + print(b) + return(key) - return (key) - - # add methods if you need more \ No newline at end of file + # add methods if you need more +c = Caesar() +print (c.answer()) \ No newline at end of file