subject

You have been given an encrypted copy of the Final exam study guide here, but how do you decrypt and read it??? Along with the encrypted copy, some mysterious person has also given you the following documents:

helloworld. txt -- Maybe this file decrypts to say "Hello world!". Hmmm.

hints. txt -- Seems important.

In a file called pa11.py write a method called decode(inputfile, outputfile). Decode should take two parameters - both of which are strings. The first should be the name of an encoded file (either helloworld. txt or .txt or yet another file that I might use to test your code). The second should be the name of a file that you will use as an output file. For example:

decode(".txt" , "translatedguide. txt")

Your method should read in the contents of the inputfile and, using the scheme described in the hints. txt file above, decode the hidden message, writing to the outputfile as it goes (or all at once when it is done depending on what you decide to use).

Hint: The penny math lecture is here.

Another hint: Don't forget about while loops...

Mac hint: use encoding="utf-8" in your file open functions, like this:

Mac hint: use encoding="ascii" in your file open functions, like this:

fin = open(input_file,"r",encoding="ascii ")

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:10, kellysimkin6196
Read the code below. what will the computer print if the input for year_variable is 1700? if year_variable == 1776: print("your answer is correct. the declaration of independence was signed in “year_variable”.") elif year_variable < 1776: compute_variable = 1776 - year_variable. print("add “compute_variable“ years to your answer for the correct answer.") elif year_variable > 1776: compute_variable = year_variable - 1776 print("subtract “compute_variable” years from your answer for the correct answer.")
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, kallee10
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, suewignall
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
image
Computers and Technology, 23.06.2019 07:30, Braxtonw875
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
You know the right answer?
You have been given an encrypted copy of the Final exam study guide here, but how do you decrypt and...

Questions in other subjects:

Konu
Mathematics, 22.05.2020 20:58
Konu
Mathematics, 22.05.2020 20:58
Konu
Mathematics, 22.05.2020 20:58
Konu
Mathematics, 22.05.2020 20:58