update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
34
.config/Code/User/History/5b46c3f1/3dfJ.py
Normal file
34
.config/Code/User/History/5b46c3f1/3dfJ.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
def calculate_total_area(shapes: list):
|
||||
sum = 0
|
||||
for shape in shapes:
|
||||
sum += shape.area()
|
||||
return sum
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
shape = Rectangle(5, 5)
|
||||
print(shape.area())
|
26
.config/Code/User/History/5b46c3f1/6IgX.py
Normal file
26
.config/Code/User/History/5b46c3f1/6IgX.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import math
|
||||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
29
.config/Code/User/History/5b46c3f1/6hzp.py
Normal file
29
.config/Code/User/History/5b46c3f1/6hzp.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
34
.config/Code/User/History/5b46c3f1/HMXg.py
Normal file
34
.config/Code/User/History/5b46c3f1/HMXg.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
def calculate_total_area(shapes: list):
|
||||
sum = 0
|
||||
for shape in shapes:
|
||||
sum += shape.area()
|
||||
return sum
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
shape = Rectangle(5, 5)
|
||||
print(shape.area())
|
28
.config/Code/User/History/5b46c3f1/PiJz.py
Normal file
28
.config/Code/User/History/5b46c3f1/PiJz.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
shape = Circle(5)
|
||||
print(shape.area())
|
27
.config/Code/User/History/5b46c3f1/QUMz.py
Normal file
27
.config/Code/User/History/5b46c3f1/QUMz.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
27
.config/Code/User/History/5b46c3f1/Y9SX.py
Normal file
27
.config/Code/User/History/5b46c3f1/Y9SX.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import math
|
||||
|
||||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
.config/Code/User/History/5b46c3f1/e3Qc.py
Normal file
3
.config/Code/User/History/5b46c3f1/e3Qc.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Shape:
|
||||
def area():
|
||||
pass
|
1
.config/Code/User/History/5b46c3f1/entries.json
Normal file
1
.config/Code/User/History/5b46c3f1/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/Python/IDS/lab3/task5.py","entries":[{"id":"e3Qc.py","timestamp":1725424572839},{"id":"jZtF.py","timestamp":1725424586899},{"id":"maFk.py","timestamp":1725424650899},{"id":"tnFd.py","timestamp":1725424710890},{"id":"xDcW.py","timestamp":1725424747440},{"id":"6IgX.py","timestamp":1725424819320},{"id":"Y9SX.py","timestamp":1725424835000},{"id":"iN8b.py","timestamp":1725424847544},{"id":"qeZx.py","timestamp":1725424859631},{"id":"oW55.py","timestamp":1725424903778},{"id":"6hzp.py","timestamp":1725424920744},{"id":"j1sx.py","timestamp":1725424930851},{"id":"QUMz.py","timestamp":1725427984588},{"id":"PiJz.py","timestamp":1725428007524},{"id":"qW1j.py","timestamp":1725428025077},{"id":"3dfJ.py","timestamp":1725428110369},{"id":"HMXg.py","timestamp":1725428264910}]}
|
28
.config/Code/User/History/5b46c3f1/iN8b.py
Normal file
28
.config/Code/User/History/5b46c3f1/iN8b.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
25
.config/Code/User/History/5b46c3f1/j1sx.py
Normal file
25
.config/Code/User/History/5b46c3f1/j1sx.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
3
.config/Code/User/History/5b46c3f1/jZtF.py
Normal file
3
.config/Code/User/History/5b46c3f1/jZtF.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Shape:
|
||||
def area():
|
||||
pass
|
8
.config/Code/User/History/5b46c3f1/maFk.py
Normal file
8
.config/Code/User/History/5b46c3f1/maFk.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
|
29
.config/Code/User/History/5b46c3f1/oW55.py
Normal file
29
.config/Code/User/History/5b46c3f1/oW55.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
from abc import ABC, abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
28
.config/Code/User/History/5b46c3f1/qW1j.py
Normal file
28
.config/Code/User/History/5b46c3f1/qW1j.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from abc import abstractmethod
|
||||
import math
|
||||
|
||||
class Shape:
|
||||
@abstractmethod
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
shape = Rectangle(5, 5)
|
||||
print(shape.area())
|
27
.config/Code/User/History/5b46c3f1/qeZx.py
Normal file
27
.config/Code/User/History/5b46c3f1/qeZx.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import math
|
||||
|
||||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
||||
def area(self) -> float:
|
||||
return math.pi * (self.radius ** 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
12
.config/Code/User/History/5b46c3f1/tnFd.py
Normal file
12
.config/Code/User/History/5b46c3f1/tnFd.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
18
.config/Code/User/History/5b46c3f1/xDcW.py
Normal file
18
.config/Code/User/History/5b46c3f1/xDcW.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
class Shape:
|
||||
def area():
|
||||
pass
|
||||
|
||||
class Rectangle(Shape):
|
||||
def __init__(self, width: int, height: int) -> None:
|
||||
super().__init__()
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def area(self) -> int:
|
||||
return self.width * self.height
|
||||
|
||||
class Circle(Shape):
|
||||
def __init__(self, radius: int) -> None:
|
||||
super().__init__()
|
||||
self.radius = radius
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue