-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Create rail_fence_cipher.py #2210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey @aakashdinkar, TravisCI finished with status TravisBuddy Request Identifier: 8d2d8050-c85b-11ea-8ad2-cd0863c1f5b3 |
Please create a function for your algorithm of the form: def rail_fence_encrypt(msg: str, key: str) --> str:
"""
>>> rail_fence_encrypt("Hello!", "secret")
'xdketlq' These are type hints and a doctest as discussed in CONTRIBUTING.md. |
Hey @aakashdinkar, TravisCI finished with status TravisBuddy Request Identifier: 0f994fb0-c861-11ea-8ad2-cd0863c1f5b3 |
Hey @aakashdinkar, TravisCI finished with status TravisBuddy Request Identifier: b7133160-c862-11ea-8ad2-cd0863c1f5b3 |
Hey @aakashdinkar, TravisCI finished with status TravisBuddy Request Identifier: d1479020-c86d-11ea-8ad2-cd0863c1f5b3 |
def rail_fence_encryption(string, key): | ||
r, c = 0, 0 | ||
val = 0 | ||
for i in range(len(input_string)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i in range(len(input_string)): | |
for char in input_string: |
val = 0 | ||
elif r == 0: | ||
val = 1 | ||
string_list[r][c] = input_string[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string_list[r][c] = input_string[i] | |
string_list[r][c] = char |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please reopen this issue once you commit the changes requested or make improvements on the code. Thank you for your contributions. |
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.