make_rectangle(width, height=None) that returns a tuple (width, height). If height is not supplied (left as None), the function should treat the shape as a square and use width for both dimensions. Note that you cannot reference width directly as a default expression (height=width is illegal at definition time), so use None as a sentinel and resolve it inside the body.make_rectangle(5)
(5, 5)
No height given, so it becomes a square with both sides 5.
make_rectangle(5, 3)
(5, 3)
Both dimensions explicitly supplied.
A default value can only be a constant/expression fixed at definition time — it cannot reference a sibling parameter, so None is the standard sentinel.
Inside the function, do `if height is None: height = width`.