1 | initial version |
I think I see the problem. You're using numerator for two things: the method numerator, and the num value.
IOW when __init__
gets executed, you're replacing the method .numerator() with the polynomial in the line "self.numerator = num". Change the name of the stored value and you should be fine.
2 | No.2 Revision |
I think I see the problem. You're using numerator for two things: the method numerator, and the instance variable holding the num value.
IOW when __init__
gets executed, you're replacing the method .numerator() with the polynomial in the line "self.numerator = num". Change the name of the stored value and you should be fine.