You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Square with size: Write a class Square that defines a square by size (based on 0-square.py). Private instance attribute: size. Instantiation with size (no type/value verification).
Size validation: Write a class Square that defines a square by size (based on 1-square.py). Instantiation with optional size: def __init__(self, size=0):.
Area of a square: Write a class Square that defines a square by size: (based on 2-square.py). Public instance method: def area(self): that returns the current square area.
Access and update private attribute: Write a class Square that defines a square by size: (based on 3-square.py). Instantiation with optional size: def __init__(self, size=0):. Public instance method: def area(self): that returns the current square area.