Intro to
Programming
(with Python)

Fall 2015
course
navigation

Oct 29

your projects

Grades & comments are posted for your midterm projects.
Discuss 'em in class.

classes II

Questions about anything we've done?
Continue our discussion of classes
as well as anything from last time, or anything you have questions about.
In class coding project : create fraction.py which implements a Fraction class, which displays as i/j and implements some of the standard math operations.
It should do something like this :
>>> from fraction import Fraction >>> Fraction(1,2) + Fraction(1/3) 4/6
(If we really want to get fancy we could have it have it convert that to 2/3 on its own ...)
http://cs.marlboro.edu/ courses/ fall2015/python/ notes/ Oct_29
last modified Thursday October 27 2016 1:21 am EDT

attachments [paper clip]

     name last modified size
   fraction.py Oct 29 2015 11:27 am 756B