Проблем

import math
figure = str(input())
side_a = float(input())
if figure == "square" or figure == "circle":
    if figure == "square":
        area_for_square  = side_a * side_a
    print(f"{area_for_square:.3f}")
    if figure == "circle":
        area_for_circle = math.pi * side_a
        print(f"{area_for_circle:.3f}")

    elif figure == "rectangle" or figure == "triangle":
        if figure == "rectangle":
            side_b = float(input())
            area_for_rectangle = side_b * side_a
            print(f"{area_for_rectangle:.3f}")
            if figure == "triangle":
                side_b = float(input())
                area_for_triangle = side_b * side_a / 2
                print(f"{area_for_triangle:.3f}")