IT 116: Introduction to Scripting
Homework 5

Due

Sunday, at 11:59 PM

Deliverables

There is one deliverable for this assignment

Make sure the script obeys all the rules specified 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.

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.

The first digit in each temperature must line up with the labels for each temperature so the output forms neat columns.

Script for this assignment

Suggestions

  1. 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.
  2. Add a formula to the loop which converts a Celsius temperature 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.
  3. Add a tab or use the format function to the print statement so both temperatures will be aligned in vertical columns.
    Run the script and fix any errors.
  4. 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 on Your Machine

Unix Setup

Copy the file to Unix

Testing the script on Unix