Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions