Let's make our area()
function completely dynamic now. It should take in arguments dynamically for any mentioned shape and provide the result. Some things we need to keep a note of are:
- The formula for the area for a rectangle requires 2 arguments: width, length
- The formula for the area of a circle requires only one argument: radius
- The formula for the area for a cuboid requires 3 arguments: height, width, breadth
If we want to use variable keyword arguments instead, we could do the following.