I want to create a class myCalc that has a constructor, with get and set methods and uses a property. I understand the get and set methods but am having trouble with putting all of the pieces together so it performs what I want it to do. What I have so far is this:
class myCalc(object):
def __init__(self):
self._ =name
def (self):
"""Get the answer doubled."""
return self._plus
def (self):
"""Get the answer squared."""
return self._times
I'd like to get as far as having the program respond with properties that double and square the number in the object. Any suggestions would be helpful.