past exam paper help!

Ian Kelly ian.g.kelly at gmail.com
Sat Apr 9 10:11:53 EDT 2016


On Sat, Apr 9, 2016 at 7:49 AM, Joseph Caulfield
<josephcaulfield1996 at gmail.com> wrote:
> On Saturday, April 9, 2016 at 2:48:16 PM UTC+1, Joseph Caulfield wrote:
>> how would I model a mug  a cylindrical vessel with an open top in python? thansk :)
>
> *as a cylindrical vessel.

class Vessel:

    def __init__(self, shape, open_top=False):
        self.shape = shape
        self.open_top = open_top

mug = Vessel('cylindrical', open_top=True)


If that's not what you meant, then you'll have to be more specific.



More information about the Python-list mailing list