Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
9 views
1 page
Python Encryption Code
Uploaded by
eleemather
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download
Save
Save python encryption code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
9 views
1 page
Python Encryption Code
Uploaded by
eleemather
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save python encryption code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 1
Search
Fullscreen
while True :
userchoice = input("Would you like to encrypt, or decrypt. ")
if "encrypt" in userchoice :
code = "
"
Usercode = str(input("Please input your code. \n"))
code_length = len(Usercode)
new_code = ""
for x in range(0, code_length):
code_letter = Usercode[x]
if code_letter == " ":
new_code += " "
elif code_letter.isalpha():
new_code += chr((ord(code_letter) - 97 + 1) % 26 + 97)
else:
new_code += code_letter
print(new_code)
if "decrypt" in userchoice :
code = "
"
Usercode = str(input("Please input your code. \n"))
code_length = len(Usercode)
new_code = ""
for x in range(0, code_length):
code_letter = Usercode[x]
if code_letter == " ":
new_code += " "
elif code_letter.isalpha():
new_code += chr((ord(code_letter) - 97 - 1) % 26 + 97)
else:
new_code += code_letter
print(new_code)
if "exit" or "quit" or "end" in userchoice :
quit()
You might also like
Cryptography Lab
PDF
No ratings yet
Cryptography Lab
62 pages
Fas
PDF
No ratings yet
Fas
59 pages
Grade 11 C. Sc. Menu-driven Programs[1]
PDF
No ratings yet
Grade 11 C. Sc. Menu-driven Programs[1]
15 pages
AP_removedtt
PDF
No ratings yet
AP_removedtt
20 pages
Shhail Ahmad
PDF
No ratings yet
Shhail Ahmad
8 pages
AP18110010172 Crypto
PDF
No ratings yet
AP18110010172 Crypto
13 pages
Ins Journal All Pracs
PDF
No ratings yet
Ins Journal All Pracs
19 pages
VERNAM - Python Activity
PDF
No ratings yet
VERNAM - Python Activity
2 pages
Computer Science
PDF
No ratings yet
Computer Science
7 pages
+ Ciphers.
PDF
No ratings yet
+ Ciphers.
10 pages
T5_Escano
PDF
No ratings yet
T5_Escano
2 pages
hack N1
PDF
No ratings yet
hack N1
4 pages
28_32
PDF
No ratings yet
28_32
6 pages
PyPass - Source Code
PDF
No ratings yet
PyPass - Source Code
22 pages
CS Project
PDF
No ratings yet
CS Project
10 pages
RECORD LIST-All Program
PDF
No ratings yet
RECORD LIST-All Program
10 pages
Ascii Code
PDF
No ratings yet
Ascii Code
4 pages
String Processing Anna Univ 1st Sem PSPP Lab
PDF
No ratings yet
String Processing Anna Univ 1st Sem PSPP Lab
8 pages
python lecture
PDF
No ratings yet
python lecture
3 pages
Document From Saritha
PDF
No ratings yet
Document From Saritha
5 pages
Case
PDF
No ratings yet
Case
11 pages
Practical 5
PDF
No ratings yet
Practical 5
2 pages
Cryptography Lab Manual
PDF
No ratings yet
Cryptography Lab Manual
18 pages
Hex
PDF
No ratings yet
Hex
1 page
Cns Lab Manual
PDF
No ratings yet
Cns Lab Manual
11 pages
password generator project
PDF
No ratings yet
password generator project
15 pages
COSC1100 Assignment3 SecretCodes-Substitution
PDF
No ratings yet
COSC1100 Assignment3 SecretCodes-Substitution
3 pages
Password Gen
PDF
No ratings yet
Password Gen
11 pages
Text Book
PDF
No ratings yet
Text Book
4 pages
Code and Output
PDF
No ratings yet
Code and Output
6 pages
pro (3)
PDF
No ratings yet
pro (3)
2 pages
Is_Exp2_C012
PDF
No ratings yet
Is_Exp2_C012
3 pages
Project - Password Generator
PDF
No ratings yet
Project - Password Generator
6 pages
3
PDF
No ratings yet
3
3 pages
HS EncryptionDecryption Program
PDF
No ratings yet
HS EncryptionDecryption Program
3 pages
Encryption using Ceaser Cipher
PDF
No ratings yet
Encryption using Ceaser Cipher
3 pages
Advance-Level Assignment Problem 1: Symmetric Encryption Service
PDF
No ratings yet
Advance-Level Assignment Problem 1: Symmetric Encryption Service
6 pages
Data Validation Solution
PDF
No ratings yet
Data Validation Solution
3 pages
Somaya Alsharani 442812381
PDF
No ratings yet
Somaya Alsharani 442812381
4 pages
Import String
PDF
No ratings yet
Import String
2 pages
Cns Prac
PDF
No ratings yet
Cns Prac
6 pages
1 Simple Substitution Cipher
PDF
No ratings yet
1 Simple Substitution Cipher
1 page
Cns Prac-1
PDF
No ratings yet
Cns Prac-1
7 pages
2. Shift by N cipher
PDF
No ratings yet
2. Shift by N cipher
1 page
python assesment 1
PDF
No ratings yet
python assesment 1
3 pages
3 Python Projects Code
PDF
No ratings yet
3 Python Projects Code
3 pages
Password Generator
PDF
No ratings yet
Password Generator
3 pages
hack N2
PDF
No ratings yet
hack N2
6 pages
Task 1
PDF
No ratings yet
Task 1
1 page
BIS PROJECT
PDF
No ratings yet
BIS PROJECT
6 pages
password-generator
PDF
No ratings yet
password-generator
1 page
Tugas Open Recruitment
PDF
No ratings yet
Tugas Open Recruitment
9 pages
Cipher Encrypt-Decrypt
PDF
No ratings yet
Cipher Encrypt-Decrypt
4 pages
code_exp_3_DES[1]
PDF
No ratings yet
code_exp_3_DES[1]
2 pages
Code
PDF
No ratings yet
Code
5 pages
PAT-2 24BCE2008 6 November 2024
PDF
No ratings yet
PAT-2 24BCE2008 6 November 2024
3 pages
PuzzleProgram Py
PDF
No ratings yet
PuzzleProgram Py
3 pages
Challenge1 50
PDF
No ratings yet
Challenge1 50
7 pages
Python For Beginners
From Everand
Python For Beginners
Célio Azevedo
No ratings yet
Gd Script
From Everand
Gd Script
Marijo Trkulja
No ratings yet