Classes. /JL

This commit is contained in:
Jan Lerking
2025-03-17 13:47:41 +01:00
parent be2ae1cdc9
commit 6402cde8b5

11
klasser/firkant.py Normal file
View File

@@ -0,0 +1,11 @@
class firkant:
def __init__(self, lg: int, br: int):
self.laengde = lg
self.bredde = br
def areal(self):
return self.laengde * self.bredde
min_firkant = firkant(10, 10)
print("Arealet er:", min_firkant.areal())