IT 116: Introduction to Scripting
Homework 5

Due Sunday, October 8th at 11:59 PM

Deliverables

There is one deliverable for this assignment: It must be in an hw5 directory, which you must create inside a hw directory inside you it116 directory.

Make sure the script obeys all the rules in the Script Requirements page.

Specification

Write a program that prints a table of Celsius temperatures from 0 to 20 degrees and prints the corresponding temperature in Fahrenheit.

This program MUST use a loop.

The first digit in each temperature must line up with the first digit of the temperatures above it so the output forms neat columns.

You MUST use the Python round function on the Fahrenheit value so only integer values appear in the tables.

Each column must have a label at the top specifying Celsius and Fahrenheit and their must be a line between these column labels and the data that follows.

Suggestions

Write a loop that runs from 0 to 20 and have it print out those values.
These are the Celsius values.
Run the script and fix any errors.

Add a formula to the loop which converts a Celsius tempearature into a Fahrenheit temperature.
Make sure the result is an integer.
Change the print statement so it prints both temperatures.
Run the script and fix any errors.

Add a tab to the print statement so both temperatures will be aligned in vertical columns.
Run the script and fix any errors.

Add a print statements before the loop that prints the name of the temperatures and a line of dashes, -.
Run the script and fix any errors.

Testing

Your output should look like this
Celsius	Fahrenheit
------------------
0	32
1	34
2	36
3	37
4	39
5	41
6	43
7	45
8	46
9	48
10	50
11	52
12	54
13	55
14	57
15	59
16	61
17	63
18	64
19	66
20	68
Be sure to run this script on the Unix machine so you know it works in the environment in which I will run it when I score your homework.