PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Python Decryption Ceaser Cypher Shift Cypher 2021

Go down

Python Decryption Ceaser Cypher Shift Cypher 2021 Empty Python Decryption Ceaser Cypher Shift Cypher 2021

Post by jamied_uk 21st April 2021, 15:41

Code:
#!/usr/bin/python3
# (C) J~Net 2021 Inspired By https://youtu.be/Ws5E2gCW4Hc
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1732-python-decryption-ceaser-cypher-shift-cypher-2021#2682
#
#
#c=(x-m)%26
print("Welcome To J~Net Python Cypher 2021")
#
def encrypted(string, shift):
    cypher=''
    for char in string:
        if char=='':
        cypher=cypher+char
        elif char.isupper():
        cypher=cypher+chr((ord(char)+shift-65)%26+65)
        else:
        cypher=cypher+chr((ord(char)+shift-97)%26+97)
    return cypher

text=input("Enter Text To Shift ")
s=int(input("Enter The Shift Key "))

print("The Original Text Is :",text)
print("The Encripted Text is :",encrypted(text,s))
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum