Table of Contents

- Course survey
- Accessing your ITaP home drive from another computer:
- For CS home drive, replace rosetta.ics.purdue.edu with vermouth.cs.purdue.edu

principal = input("Principal: ") rate = input("Annual percentage rate: ") for year in range(10): principal = principal * (1+rate) print principal

n = input("How many numbers? ") avg = 0 for i in range(n): x = float(input("Enter next number: ")) avg = avg + x/float(n) print avg

Convert and print a range of temperatures from degrees Fahrenheit to degrees Celsius. The formula to do so is tempC = (5/9)*(tempF - 32). Do this for the following ranges (inclusive for both min/max):

- Every degree from -20 through 32
- Every ninth degree from 5 through 212
- Every other degree from 80 to 30 (it must print the higher values first)

You should print the degrees in Fahrenheit and degrees Celsius for each requested value.

print 'Degrees F\tDegrees C' for degF in range(-20, 33): degC = (degF - 32) / 1.8 print degF, '\t\t', degC for degF in range(5, 213, 9): degC = (degF - 32) / 1.8 print degF, '\t\t', degC for degF in range(80, 30, -2): degC = (degF - 32) / 1.8 print degF, '\t\t', degC