Question: Create a python function, cipher(message), to encrypt a message by substituting the letters of the English alphabet with numbers from 0-25 where 0 is letter
Create a python function, cipher(message), to encrypt a message by substituting the letters of the English alphabet with numbers from 0-25 where 0 is letter a and 25 is letter z. Your function should disregard the case and treat all letters as lowercase. Upon encrypting the message, return the encrypted message and write the results to a file called cipher.txt. If there is a non-alphabetic character in the message, terminate the program with a message (given in the example below) and exit the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
