Spring2015.CSCI220Homework1 History

Hide minor edits - Show changes to output

Changed line 37 from:
# digitalPiano1.py
# FahrenheitToCelsius.py
Added lines 1-68:
'''Assigned Date''': Monday, Jan. 26, 2015\\
'''Due Date''': Friday, Jan. 30, 2015\\
'''Due Time''': 12:20pm

Last modified on {$LastModified} [-(see [[http://www.cs.cofc.edu/~manaris/index.php/Spring2015.CSCI220Homework1?action=diff&source=n&minor=n | updates]]) -]


This assignment focuses on:

# Be able to edit and run a Python program using the JEM or IDLE integrated development environment (IDE).
# Interact with simple Python programs that produce output and do arithmetic.


Write a program that converts temperatures from Fahrenheit to Celsius.


Make sure your program is user-friendly, i.e., that it provides a meaningful input prompt and output message.


Check the user input to ensure that it is an int or a float before making the conversion. If the user makes an error, output a meaningful error and terminate. If the input is correct, perform the conversion and output the result.

If you do the bonus, make sure you update the header documentation below to reflect that.


In general, you should comment any variable, obscure statement, block of code, etc. you create.

Additionally, your code should always have header documentation that explains what the program does, in general terms.

For this assignment, just copy and paste these into the top of your program. (For future assignments, you will have to modify these comments, to fit the new assignment.)

(:source lang=Python tabwidth=3 -trim :)
# digitalPiano1.py
# Author: <Your name>
# Email: <Your email address>
# Class: CSCI 220
# Assignment: Homework #1
# Due Date: <The assignment's due date>
# Purpose: This program converts degrees Fahrenheit to degrees Celsius.
# Input: The degrees in Fahrenheit. No error checking is performed
# (i.e., we assume the user makes no mistake when entering these values).
# Output: The corresponding degrees in Celsius.

'''NOTE:''' In the above, replace the bracketed phrases, e.g., '''<Your name>''', with your name, e.g., '''John Smith'''. Do remove the brackets.


You will submit your assignment via [[https://lms.cofc.edu/ | OAKS]]. Your submission consists of:

# Your Python program. Call it, '''FahrenheitToCelsius.py'''.

# A printout of your program - to be submitted in class on the due date.

# If you do the bonus, submit a separate, additional program. Give this program a different name, i.e., '''FahrenheitToCelsius.bonus.py'''


Your grade will be based on how well you followed the above instructions.