Question: Using only R programming : 2. You are tasked to establish a secret communication procedure for members of your team. You choose to encode the

Using only R programming :Using only R programming : 2. You are tasked to establish a

2. You are tasked to establish a secret communication procedure for members of your team. You choose to encode the messages using the A1226 cypher, by which each alphabet letter is replaced by its number in the alphabet, i.e., A is 1, B is 2, C is 3, ... and Z is 26. a) First, produce the letter (A to Z) and number (1 to 26) character vectors. (2 marks) b) Using the above vectors, character substitution, and a control structure, encode the following message: "h-i-b-y-e" Note that for simplicity, the message must not contain any repeated letters as a rule. (3 marks) c) Wrap your code from 2(b) in a function that can receive and cypher any message. Test your code with a unique message. (5 marks) [TOTAL 10 MARKS]

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!