Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE SCHEME LANGUAGE (R5RS) TO SOLVE THIS PROBLEM 1. Using Scheme higher-order function map to implement the string encryption and decrption. [10 points] 1.1 The

USE SCHEME LANGUAGE (R5RS) TO SOLVE THIS PROBLEM

1. Using Scheme higher-order function map to implement the string encryption and decrption. [10 points]

1.1 The encryption function must (1) take the encryption key (key can be between 1 and 4) from the keyboard using (read); and (2) encrypt alphabetic characters and digits only. [5]

1.2 The decryption function must (1) take the encryption key from the keyboard using (read) and (2) decrypt the string generated from your encryption function. [5]

Test cases:

(encrypt "Hello CSE240!")

(decrypt "Khoor FVH573!")

3

"Khoor FVH573!"

3

"Hello CSE240!"

Note: When you encrypt a valid character (letters and digits), you add a key to the character. When you decrypt, you will have a different set of the valid characters, which is caused by +key. You can limit the allowed key value to be 1, 2, 3, and 4.

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

Students also viewed these Databases questions

Question

What is each project's initial npv without replication?

Answered: 1 week ago

Question

Were they made on a timely basis?

Answered: 1 week ago

Question

Did the decisions need to be made, or had they already been made?

Answered: 1 week ago