Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I don't understand how I am suppose to create the needed step to use the dictionary code to encrypt the requested message my teacher gave

I don't understand how I am suppose to create the needed step to use the dictionary "code" to encrypt the requested message my teacher gave us for this assignment.

Assignment: Write a program that uses a dictionary to assign "codes" to each letter of the alphabet. For example: codes = { 'A' : '%', 'a' : '9', 'B' : '@', etc....} Using this example, the letter A would be assigned the symbol %, the letter 'a' would be assigned the number 9 and so forth. The program should open a specified text file, read its contents, and then use the dictionary to write an encrypted version of the file's contents to a second file. Each character in the second file should contain the code for the corresponding character in the first file. Write a second program that opens an encrypted file and displays its decrypted contents on the screen.

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_2

Step: 3

blur-text-image_3

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

1. PricewaterhouseCoopers

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago