-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This code allows users to encrypt and decrypt specific data
- Loading branch information
0 parents
commit e83db6b
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#Data encrypting | ||
print("Problem 1") | ||
a = input("Kindly enter the string 'the quick brown fox jumps over the lazy dog' to encrypt: ") | ||
b = "the quick brown fox jumps over the lazy dog" | ||
while a != b: | ||
c = input("Error. Please try again: ") | ||
if c == b: | ||
print("Encrypted string: th& q!#ck br+wn f+x j!mps +v&r th& l*zy d+g") | ||
break | ||
while a == b: | ||
print("Encrypted string: th& q!#ck br+wn f+x j!mps +v&r th& l*zy d+g") | ||
break | ||
|
||
|
||
#Data decrypting | ||
print("\nProblem 2") | ||
a = input("Kindly enter the string 'th& q!#ck br+wn f+x j!mps +v&r th& l*zy d+g' to decrypt: ") | ||
b = "th& q!#ck br+wn f+x j!mps +v&r th& l*zy d+g" | ||
while a != b: | ||
c = input("Error. Please try again: ") | ||
if c == b: | ||
print("Decrypted string: the quick brown fox jumps over the lazy dog") | ||
break | ||
while a == b: | ||
print("Decrypted string: the quick brown fox jumps over the lazy dog") | ||
break |