7 lines
249 B
Python
7 lines
249 B
Python
# Test de la classe Rectangle
|
|
rectangle = Rectangle(5, 3) # 5:width & 3:length
|
|
print("Largeur:", rectangle.width)
|
|
print("Longueur:", rectangle.length)
|
|
print("Aire:", rectangle.calculate_area())
|
|
print("Périmètre:", rectangle.calculate_perimeter())
|