polygon-area-calculator/main.py

20 lines
426 B
Python
Raw Normal View History

2020-09-29 19:14:39 +02:00
# This entrypoint file to be used in development. Start by reading README.md
import shape_calculator
from unittest import main
rect = shape_calculator.Rectangle(5, 10)
print(rect.get_area())
rect.set_width(3)
print(rect.get_perimeter())
print(rect)
sq = shape_calculator.Square(9)
print(sq.get_area())
sq.set_side(4)
print(sq.get_diagonal())
print(sq)
# Run unit tests automatically
main(module='test_module', exit=False)