CSC 160 - Computer Programming for Non-majors

Assignment #1: An exercise in using the Python interpreter

Due Thursday, September 3, 2015

Given the program listed below, enter it IDLE, the Python interactive development environment, run the program and and print it out. You will submit the listing as the assignment.

# This program converts temperature in degree Fahrenheit
# into degrees Celsius
  
# Get the temperature in degrees Fahrenheit
fahr = float(input("Enter a temperature in degree Fahrenheit  ?"))

# Convert into Celsius and print it
celsius = (fahr - 32)*5/9;
print(fahr, "degrees Fahrenheit is ", celsius,
    " degrees celsius")

[Back to the Assignment List]