Classes. /JL
This commit is contained in:
11
klasser/firkant.py
Normal file
11
klasser/firkant.py
Normal 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())
|
Reference in New Issue
Block a user