Пример #1
0
def main():
    circle = Circle(1.5)
    print("A circle", circle)
    print("The radius is", circle.getRadius())
    print("The diameter is", circle.getDiameter())

    rectangle = Rectangle(2, 4)
    print("\nA rectangle", rectangle)
    print("The area is", rectangle.getArea())
    print("The perimeter is", rectangle.getPerimeter())
def main():
    circle = Circle(1.5)
    print("원", circle)
    print("반지름은", circle.getRadius(), "입니다.")
    print("넓이는", circle.getArea(), "입니다.")
    print("지름은", circle.getDiameter(), "입니다.")

    rectangle = Rectangle(2, 4)
    print("\n사각형", rectangle)
    print("넓이는", rectangle.getArea(), "입니다.")
    print("둘레", rectangle.getPerimeter(), "입니다.")
Пример #3
0
def main():
    circle = Circle(1.5)
    print("A circle", circle)
    print("The radius is", circle.getRadius())
    print("The area is", circle.getArea())
    print("The diameter is", circle.getDiameter())

    rectangle = Rectangle(2, 4)
    print("A rectangle", rectangle)
    print("The area is", rectangle.getArea())
    print("The perimeter is", rectangle.getPerimeter())