You have been tasked to write a C# application that will go
through the first step of encrypting an input file and writing the
encrypted contents to an output file.
For this first step in encryption, read each letter in from the
input file, add 3 letters to the value of the input letter. If the
input letter is an A then the encrypted letter would be a D. If the
input letter from the input file is an X then the encrypted letter
would be an A.
All spaces, digits, punctuation, and special characters do not need
to be encrypted at this level. Simply write the space,
punctuation, or special character to the output file as is.
If a letter is uppercase in the input file, it should remain as an
uppercase character in the output file. If a letter is lowercase in
the input file, it should remain as a lowercase character in the
output file.
Since this program runs each month, the input file will be of
various lengths; therefore, the program will read until end of
file.
The input file is found in the current directory and is named
October20.txt. The output
file will be written to the current directory and named
EncryptOct20.txt.
An example:
If the contents of the input file is
| Live long and prosper. |
The output file would be:
| Olyh orqj dqg survshu. |
What the user should see when the program executes:
When the program begins, the statement "Encryption Level 1" should
be displayed.
The focus should be set to the "Begin Encryption" button.
When the user clicks the "Begin Encryption" button, the program
opens the input file, the statement "Opening input file...." should
be displayed. The "Begin Encryption" button should be
disabled.
When the program begins reading through the input file encrypting
the contents, the statement "Encrypting input file...." should be
displayed.
When the program closes the input and output files, the statement
"Encryption complete...." should be displayed.
When the program is complete, the statement "End of process" should
be displayed.
In: Computer Science
Due
Sunday, November 1st at 11:59 PM
Deliverables
There is one deliverable for this assignment
Make sure the script obeys all the rules in the Script Requirements page.
Specification
Your script must print a Kelvin to Fahrenheit conversion table and between a minimum and maximum values, and a Fahrenheit to Kelvin conversion also between a minimum and maximum values.
Here is the formula for converting Kelvin to Fahrenheit
Here is the formula for converting Fahrenheit to Kelvin
The script must have 5 functions
get_int
This function must have the following header
def get_int(prompt):
The function prompts the user for a value, converts it to integer and returns the value.
kelvin_to_fahrenheit
This function must have the following header
def kelvin_to_fahrenheit(kelvin):
The function converts a Kelvin temperature to Fahrenheit and returns the Fahrenheit value.
The Fahrenheit value must be an integer.
kelvin_to_fahrenheit_table
This function must have the following header
def kelvin_to_fahrenheit_table(min, max):
The function prints a Kelvin to Fahrenheit conversion table running from min to max.
Before printing the table, the function prints the labels "Kelvin" and "Fahrenheit", followed by a line of dashes.
The Fahrenheit values should align with the "Fahrenheit" label.
See the example below.
fahrenheit_to_kelvin
This function must have the following header
def fahrenheit_to_kelvin(fahrenheit):
The function converts a Fahrenheit temperature to Kelvin and returns the Kelvin value.
The Kelvin value must be an integer.
fahrenheit_to_kelvin_table
This function must have the following header
def fahrenheit_to_kelvin_table(min, max):
The function prints a Fahrenheit to Kelvin conversion table running from min to max.
Before printing the table, the function prints the labels "Fahrenheit" and "Kelvin", followed by a line of dashes.
The Kelvin values should align with the "Kelvin" label.
See the example below.
Script for this assignment
Open an a text editor and create the file hw7.py.
You can use the editor built into IDLE or a program like Sublime.
Test Code
Your hw7.py file must contain the following test code at the bottom of the file
min_kelvin = get_int("Minimum Kelvin temperature: ")
max_kelvin = get_int("Maximum Kelvin temperature: ")
print()
kelvin_to_fahrenheit_table(min_kelvin, max_kelvin)
print()
min_fahrenheit = get_int("Minimum Fahrenheit temperature: ")
max_fahrenheit = get_int("Maximum Fahrenheit temperature: ")
print()
fahrenheit_to_kelvin_table(min_fahrenheit, max_fahrenheit)
You should see something like this
python3 hw7.py Minimum Kelvin temperature: 255 Maximum Kelvin temperature: 260 Kelvin Fahrenheit ------------------ 255 -1 256 1 257 3 258 5 259 7 260 8 Minimum Fahrenheit temperature: 10 Maximum Fahrenheit temperature: 15 Fahrenheit Kelvin ----------------------- 10 261 11 261 12 262 13 263 14 263 15 264
The entries in blue are user input.
Suggestions
In other words, write a bit of code, test it, make whatever changes you need to get it working, and go on to the next step.
Write this program in a step-by-step fashion using the technique of incremental development.
Testing on Your Machine
Minimum Kelvin temperature: 255 Maximum Kelvin temperature: 260 Kelvin Fahrenheit ------------------ 255 -1 256 1 257 3 258 5 259 7 260 8 Minimum Fahrenheit temperature: 10 Maximum Fahrenheit temperature: 15 Fahrenheit Kelvin ----------------------- 10 261 11 261 12 262 13 263 14 263 15 264The entries in blue are user input.
Unix Setup
cd it116
cd hw
mkdir hw7
ls
Copy the file to Unix
Testing the script on Unix
cd it116/hw/hw7
python3 hw7.py
Minimum Kelvin temperature: 255 Maximum Kelvin temperature: 260 Kelvin Fahrenheit ------------------ 255 -1 256 1 257 3 258 5 259 7 260 8 Minimum Fahrenheit temperature: 10 Maximum Fahrenheit temperature: 15 Fahrenheit Kelvin ----------------------- 10 261 11 261 12 262 13 263 14 263 15 264The entries in blue are user input.
In: Computer Science
Using time series diagrams, illustrate how this decrease in the money growth rate affects the money supply MK; South Korea’s interest rate; prices PK; real money supply; and Ewon/¥ over time. (Plot each variable on the vertical axis and time on the horizontal axis.)
In: Economics
A disoriented physics professor drives 3.35 km north, then 4.67 km west, and then 1.69 km south.
Part A
Find the magnitude of the resultant displacement of this professor.
Express your answer in kilometers.
Part B
Find the direction of the resultant displacement of this professor.
Express your answer in degrees.
In: Physics
Which of these statements best describes the significance of the negative sign in Faraday’s Law?
A) The voltage produced tires to keep the magnetic flux constant.
B) The current always flows backwards.
C) Magnetic fields point from North to South.
D) All of these statements are pretty good descriptions.
In: Physics
A 1200-kg car is travelling east at a rate of 9 m/s. A 1600-kg truck is travelling south at a rate of 13 m/s. The truck accidentally runs a stop sign and collides with the car in a completely inelastic collision. What is the speed of the combined mass after the collision?
In: Physics
Please answer the below questions. Thanks.
Kimmswick, Missouri–Illinois
14. What are the gradients of the Mississippi River and of Glaze
Creek?
19. Why does Fountain Creek flow some 10 mi south along the floodplain before entering the Mississippi River? What is this feature called?
In: Civil Engineering
Do a quick calculation of the thermal conductance (U value) across a cavity wall consisting of:
1. Outer skin 110mm brickwork (South facing, exposed aspect)
2. 30mm cavity
3. Inner skin of 10mm plasterboard
(Hint: R value and U-values are required)
In: Civil Engineering
You are a highly ranked Supply Chain Management executive in your company.
Choose one of these regions:
•Sub-Saharan Africa
•Eastern Europe
•South Asia
And describe how you might analyze risk when dealing specifically with:
•Engineering and Technology
•Procurement
•Logistics
•Customer Service
In: Operations Management
Entry to the AI, robotics and blockchain: Make use of value chain management theories and discuss how the rural poor can gain access to the technology or 5G (fifth generation cellular network technology)? Note: please consider the role of Independent Communications Authority of South Africa (ICASA)
In: Operations Management