Write a program that opens an encrypted file

Assignment Help Python Programming
Reference no: EM13772270

File Encryptions and Decryption

Write a program that uses a director 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 it 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 corresponding character in the first file.

Write a second program that opens an encrypted file and display its decrypted contents on the screen.

Word Frequency

Write a program that reads the contents of a text file. The program should create a dictionary in which the keys are the individual words found in the file and the values are the number of times each word appears. For example, if the word "The" appears 128 times, the dictionary would contain an element with ‘the' as the key and 128 as the value. The program should either display the frequency of each word or create a second file containing a list of each word and its frequency.

Instructions

There are "Programming Exercises" for Chapter 9 on pages 415-418 in the course text.

Your assignment is to write programs for Exercise 3 and Exercise 5. For both exercises, use the text file namedfor_chapter9.txt. This file is provided in a zip above the drop box for this assignment.

Create a folder that identifies you and Assignment 3 such as smith_asst3 or asst3_jones. Save all Python programs to this folder. Zip the folder. No .rar files allowed. Upload the zip to the Assignment 3 drop box.

Reference no: EM13772270

Questions Cloud

Find video clips of commercials for particular product : Advertisers and marketers use information about our motivations when they create advertising campaigns. Find video clips of commercials for a particular product and identify which motivations are being targeted in the ad.
Similarities between windows 8.1 and earlier versions : Prepare a report that could be used to describe the changes and similarities between Windows 8.1 and earlier versions of Windows.
Major human activities that impact the environment : Why are consumer demand and regulation inadequate to address sustainability? What is meant by the term "regulatory capture". Provide at least one example to support your answer. Why is regulatory capture such a prevalent problem?
History and implications of child abuse and neglect : Write a 1,000- to 1,250-word paper on the history and implications of child abuse and neglect. Answer the following questions in your paper:
Write a program that opens an encrypted file : Write a second program that opens an encrypted file and display its decrypted contents on the screen.
Large mass required to have a supernova event : What would the major impact be on Earth be if the Earth remained in its present orbit and our Sun was 50% more massive than it is now?
World health organization-requirements of the energy policy : How much water does the World Health Organization suggest people need to survive? How much water does the U.S. Agency for International Development state that a person needs for a reasonably good quality of life? In the United States, what is th..
Write a summary of the fear of social media is unfounded : Write a summary of The Fear of Social Media Is Unfounded, Social Networks Enable Quick Collaboration Around Issues and Social Media Helps Students Write Better.
Supply-chain challenges in post-earthquake : What impact do you think Toyota's plan will have on the way it handles relationship management in its supply chain?

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd