def triangle(b, h): return b * h / 2 def rectangle(a, b): return a * b def square(a): return rectangle(a, a) # プログラム7-15(モジュールpolygon_areaを作る)