Bigrandom + Caesar#19
Open
suliskh wants to merge 7 commits intoComputingTelU:masterfrom
suliskh:master
Open
Conversation
satriahrh
suggested changes
Feb 27, 2017
Contributor
satriahrh
left a comment
There was a problem hiding this comment.
bigrandom benerin lagi di yang aku comment.
yang caesar coba baca soalnya lagi deh.
| # ommiting line number's hashtag | ||
| suc = 0 # variable to store sum of character's code in ascii, | ||
| # ommiting line number and its hashtag | ||
| self.data = open("data.txt", "r") |
Contributor
There was a problem hiding this comment.
jangan ngubah nilai atribut
|
|
||
| def answer(self): | ||
| key = 0 # variable to store the key | ||
| self.ciphertext = open("ciphertext.txt", "r+") |
Contributor
There was a problem hiding this comment.
jangan ngubah nilai atribut
caesar/answer.py
Outdated
| msg = ''.join([chr(ord(x) - key) for x in str(self.ciphertext.readlines())]) # ____ decripting @return decripted string | ||
| print("Hasil decrypt dengan key %d adalah \n %s" % (key, msg)) # __________________ printing out | ||
| self.ciphertext.close() # _________________________________________________________ close data stream | ||
| return (msg) |
Contributor
There was a problem hiding this comment.
kok return nya jadi ini??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kukuh Aji Sulistyo / 1301151429
Note: maaf profilenya ada 2 (@kamitetepde & @kukuh-sulistyo), saya punya 2 akun, dan waktu itu saya lupa config