I browsed through several similar questions on here before I decided to ask. There were similar questions about the same error, but they weren't the same type of problem, and none of the answers resolved my problem.
Nonetheless, I'm getting a Typeerror which says 'function' object has no attribute 'getitem'. Here is my code:
def Rectangle(width, height):
area = Rectangle[width] * Rectangle[height]
a = Rectangle(5, 7)
print(a.area)
Now I know there are easier ways to do this, but the challenge is to do it using functions and classes. I'm wondering where I'm going wrong with this?