How would i write a program that asks for you to input a letter (a for example) and how many letters you want to shift (3 for example) and gives you the decoded letter (D)? Also how would you loop it so it goes from Z and starts over with A instead of going to other characters in ASCII using ord()? Timely response would be greatly appreciated!
SwisherStreets
0
Newbie Poster
Recommended Answers
Jump to PostOne way to do this is using a shifted alphabet, here is a simple example:
# rotation_crypt1.py # use the index in the regular alphabet and apply it to a # shifted alphabet (all upper case letters for simplicity) import string alpha = string.ascii_uppercase shift = 3 …
All 3 Replies
SwisherStreets
0
Newbie Poster
sneekula
969
Nearly a Posting Maven
Gribouillis
1,391
Programming Explorer
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.