Question: This must be done in Python!!!! 1) Go to https://en.wikipedia.org/wiki/Caesarcipher to see what a Caesar cipher is. Write a function called cipher(phrase,shift) that accepts two

This must be done in Python!!!!

This must be done in Python!!!! 1) Go to https://en.wikipedia.org/wiki/Caesarcipher to see

1) Go to https://en.wikipedia.org/wiki/Caesarcipher to see what a Caesar cipher is. Write a function called cipher(phrase,shift) that accepts two parameters: a string phrase and an integer shift. The integer shift can be positive, negative or zero. Mentally form a ring of characters made up of the character space' (ascii code 32) through the character'"(ascii code 126) in the ASCII table http://www.asciitable.com/. Shift the characters in the phrase specified by the number shift. If it is positive, shift the phrase to the right, or up. If it is negative, shift the phrase to the left, or down. Your function should be able to wrap around as well. Hence, cipher("~,1) will yield" "and cipher("-2) will yield "J". Hint: there are 95 characters in the ring. That is, 95-ord) ord1. You may want to use the following functions in your code: ord('A') -65, and chr(65) A', and ".join(['A, B']) AB'. (200 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!