Question: A Caesar cipher encryption is an algorithm that encrypts texts by replacing letters forwards or backwards along the alphabet. For example, a Caesar cipher encryption

 A Caesar cipher encryption is an algorithm that encrypts texts by

A Caesar cipher encryption is an algorithm that encrypts texts by replacing letters forwards or backwards along the alphabet. For example, a Caesar cipher encryption with shift +3 would replace the letter "a" by the letter "d", the letter "b by the lettr, and the letter z by the letter "C Write a Matlab function rotatedText-rot (text,n)that does the following 1. If the string text contains only lowercase letters, the function should apply a Caesar cipher encryption with shift n to the string text. In this case the output of the function should be a string containing lowercase letters only. (3 pts) 2. The function should shift uppercase letters to uppercase letters and lowercase letters to lowercase letters. (1 pt) 3. If the string text contains numbers or special characters like 3, S, !, &, the function should leave these characters unchanged. (1 pt) 4. The function should work for negative shifts. 2 pts) 5. The function should work for shifts greater than 26 and less than -26. (1 pt) You should test your function with the following values (you can get credit for this, even if you have incorrect output!) (2 pts) >rot ('aByz',3) nS dEbe >rotdEbc-3) ALS aByz >>rot'M4th',10) W4dr >>rotW4dr-10) M4th >>rotM4th',50) K4rf >>rotK4rf,-50) M4th

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!