Question: python 3.6 Requriements Submit only the files requested Print all floats to 2 decimal points unless stated otherwise Descripition For this problem you will be

python 3.6

Requriements

Submit only the files requested

Print all floats to 2 decimal points unless stated otherwise

Descripition

For this problem you will be implementing a Caesarin Cipher. A Caesarin Cipher takes a string and a shift amount and shift the characters in the string by the shift amount.

Specifications

Only characters should be ciphered

If a character is shifted beyond the end of the aphabet it should wrap back around

For example if the letter 'y' is shifted 3 it will become 'b'

You will find the functions chr and ord very helpful for this assignmentord takes in a single character and gives back its ascii value

ord('a') is 97

ord('B') is 66

chr takes an integer number and gives back the character it represents

chr(97) is 'a'

chr('B') is 66

Combining these ideas together

chr(ord('a') + 2) is 'c'

chr(ord('B') + 3) is 'E'

Assumptions

Input will not always be valid

If invalid input is received your program should continue to ask for more input until a valid value is entered

While input may be invalid it will always be of the correct type

Valid Input

Shift amount: a value between 0 and 25

String to be ciphered: any string is valid

Example 1

Please enter a string to be ciphered: abcXYZ Please enter a shift amount between 0 and 25: 1 bcdYZA

Example 2

Please enter a string to be ciphered: ABCxyz 123

Please enter a shift amount between 0 and 25: 3 DEFabc 123

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!