Are you stressed by poor grades and tight deadlines? We have your back. We can do this or a different assignment for you at an affordable price. Use writing services to score better and meet your deadlines.

Order a Similar Paper Order a Different Paper

Programming Assignment 5 (125 Points)

Assignment Overview
This assignment will give you some experience with dictionaries, as well as some more practice with file I/O.
Part 1: Phone keypads [50 points]
The international standard letter/number mapping found on the telephone is shown below:
Write a function that returns a number, given an uppercase letter, as follows:
def getNumber(uppercaseLetter):
Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (upper- or lowercase) to a digit and leaves all other characters intact.
Here is a sample run of the program: Enter a string: 1-800-Flowers
1-800-3569377 Enter a string: 1800flowers
Part 2: File Encryption and Decryption [75 points]
Write a program that uses a dictionary to assign “codes” to each letter of the alphabet.
For example:
codes = { ‘ A’ : ‘ %’ , ‘ a’ : ‘ 9’ , ‘ B’ : ‘ @’ , ‘ b’ : ‘ #’ , etc…}
Using this example, the letter A would be assigned the symbol %, the letter a would be assigned the number 9, the letter B would be assigned the symbol @, 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.

1. Include the standard program header at the top of your Python file.
2. Submit your files to Etudes under the “Assignment 5” category.
Standard program header
Each programming assignment should have the following header, with italicized text appropriately replaced.
Note: You can copy and paste the comment lines shown here to the top of your assignment each time. You will need to make the appropriate changes for each assignment (assignment number, due date, and description).
* Program or Lab #: Insert assignment name
* Programmer: Insert your name
* Due: Insert due date
* CS21A, Summer 2014
* Description: (Give a brief description for Assignment 5) ”’
Write a second program that opens an encrypted file and displays its decrypted contents on the screen.

We offer CUSTOM-WRITTEN, CONFIDENTIAL, ORIGINAL, and PRIVATE writing services. Kindly click on the ORDER NOW button to receive an A++ paper from our masters- and PhD writers.

Get a 10% discount on your order using the following coupon code SAVE10

Order a Similar Paper Order a Different Paper