Chapter 2 - Methods and Classes
Exercise 3: Validation
In your Rectangle
class from the previous exercise, modify both the width=
and height=
attribute writer methods to raise an error if a negative value is provided.
In your Rectangle
class from the previous exercise, modify both the width=
and height=
attribute writer methods to raise an error if a negative value is provided.