Skip to content

Commit

Permalink
Create Encrypt-and-Decrypt-Data
Browse files Browse the repository at this point in the history
This code allows users to encrypt and decrypt specific data
  • Loading branch information
ralphmatthew authored Sep 22, 2023
0 parents commit e83db6b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Encrypt-and-Decrypt-Data
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

0 comments on commit e83db6b

Please sign in to comment.