Write another python program to decode the encoded message

Assignment Help Python Programming
Reference no: EM131325224

Write a Python program to encode the plain text message and another Python program to decode the encoded message.

Use the following as starter code:

# <Put your name here> # HW 5 Caesar Cipher: Encoder # Do not modify next 8 lines def encode(): print("Caesar cipher") print() # chars is given for your convenience. It will help for # an easier solution. You do not have to use it. chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" # Fill in the expression to ask for the key value: key = # Fill in the expression to ask for the phrase to encode: plain = # Your main code starts here. Use as many lines as needed. # Do not modify any lines below print("Encoded message follows:") print(cipher) encode()

Be aware that chars is a long string having 53 characters in it. There is only one space between letters `Z' and `a' in it.

You must use an accumulator variable for the encoded message.

You may also want to use a for loop, the remainder operator, the string find() function to find the location of a letter from chars, string indexing and the len() function.

You are not allowed to use any other Python modules or functions that have not been discussed in class nor in the book.

Show the result using the message "The quick brown fox Alice jumps over the lazy dog Zoro" in a Jupyter Notebook cell.

2. Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.

Use the following as starter code:

# <Put your name here> # HW 5 Caesar Cipher: Decoder # Do not modify next 8 lines def decode(): print("Caesar cipher") print() # chars is given for your convenience. It will help for # an easier solution. You do not have to use it. chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" # Fill in the expression to ask for the key value: key = # Fill in the expression to ask for the phrase to decode: plain = # Your main code starts here. Use as many lines as needed. # Do not modify any lines below print("Decoded message follows:") print(cipher) decode()

Use the same guidelines as given in the previous question.

Show the result using the encoded message from "The quick brown fox Alice jumps over the lazy dog Zoro" in a Jupyter Notebook cell.

Attachment:- Attachments.rar

Reference no: EM131325224

Questions Cloud

How would speculation be undertaken using the spot market : Are the quotations given direct or indirect Copenhagen quotations?- How would the speculation be undertaken using the spot market only?
How has modern technology impacted peoples views on ethics : Looking at the impact of technology (computers, the Internet, smartphones, etc.) on American society, how has modern technology impacted people's views on ethics?
Write a page summary of your conversation with jim : Imagine you work at a company and it is time for an employee named Jim's annual review. While he was a model employee the first nine (9) months of the year, recently Jim has been coming in late. It has not been just a few minutes each day, either...
Calculate the outright quotes for one and six months forward : Calculate the outright quotes for one, three and six months forward.- If the treasurer wished to buy Ruritanian doppels three months forward, how much would he or she pay in dollars?
Write another python program to decode the encoded message : Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.
Describe historical events or factors : Briefly describe systems theory and the advent of systems thinking. Describe historical events or factors that have influenced systems thinking. Discuss how these historical factors have influenced: a) society, b) human resources, and c) you as an in..
Why is harrison bergeron particularly threatening : Why is Harrison Bergeron particularly threatening to those in power in his society - It's possible that Garcia-Marquez have intended the Old Man with Enormous Wings to actually be an angel? If so, what point is he making about the villagers, and, u..
What is an example of a recent creative sourcing strategy : What is an example of a recent creative sourcing strategy used by a company and how successful was it?Share other sourcing strategies you personally think are creative,Please describe them,Share why you think they are creative.
What is the relationship between beauty : By contrast, Plato (in The Republic) warns of poetry's power to make a falsehood seem true, by beautifying it. What, then, is the relationship between beauty, as achieved by the artist, and truth?

Reviews

Write a Review

Python Programming Questions & Answers

  Write an expression that concatenates the string

Write an expression that concatenates the String variable suffix onto the end of the String variable prefix .

  Python errors

python errors, please correct them that are located in this program,

  Python scripting language

Your programming project will be a simple, working program, using a Python scripting language, which utilizes a good design process and includes: Sequential, selection, and repetitive programming statements as well as and At least one function call

  Programmer does not have to use the def statement

Unlike Z+-, the programmer does not have to use the DEF statement to create a variable. Instead, the programmer can simply use the variable. The first use of the variable creates it and initializes it to 0.

  Most popular name would be the one with the biggest number

the program will ask you to insert the year that the user is interested in, then ask the gender that the user is interested in, and print out the most popular names corresponding to the year and gender. FYI, the number on the right represents how man..

  Write a program that generates two integers

Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise.

  Display the percent-ages of the overall grade

Write a program that uses a bar chart to display the percent-ages of the overall grade represented by the project, quizzes the midterm exam and the final exam

  A stack data structure that uses a linked list for storing

In Python, implement a stack data structure that uses a linked list for storing its elements. In particular, you will need to implement the following three functions: 1. top(): This function returns the element that is at the top of the stack, but it..

  Ida to reverse engineer a piece of shellcode

You are a Malware Investigator at 0xC0ff33, Inc and an incident responder came across injected shellcode during an investigation. He has done all he can in IDA and has passed on the .idb file to you. Figure out what the purpose of the malware was ..

  Program to do the enciphering

Write a program to do the enciphering. It should prompt the user for a message, and print out both the entered message and its corresponding ciphertext.

  Arithmetic progression is a sequence of numbers

An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same.

  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.

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