Find area

Report a typo

Below you can see the Area class. Write the body of a rhombus_area method that will find the area assuming that it is always half the product of its diagonals (the lengths of diagonals should be given as arguments).

class Area:

    def __init__(self, figure_name):
        self.figure_name = figure_name

    def rhombus_area(a, b):
        ...

For example, for values 8 and 9 the method should return 36.0. You do not have to take input or create class instances, but do not forget to specify the decorator that will allow us to access the method without any class instances.

Write a program in Python 3
class Area:

def __init__(self, figure_name):
self.figure_name = figure_name

# use appropriate decorator
def rhombus_area(a, b):
...
___

Create a free account to access the full topic