rocket-package-ibrahim 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rocket/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .rocket import Rocket, Shuttle, CircleRocket
rocket/rocket.py ADDED
@@ -0,0 +1,41 @@
1
+ from math import pi, sqrt
2
+
3
+ class Rocket:
4
+ def __init__(self, x=0, y=0):
5
+ self.x, self.y = x, y
6
+
7
+ def move_rocket(self, x_increment=0, y_increment=1):
8
+ self.x += x_increment
9
+ self.y += y_increment
10
+
11
+ def get_distance(self, other):
12
+ return sqrt((self.x - other.x)**2 + (self.y - other.y)**2)
13
+
14
+ def __eq__(self, other):
15
+ if not isinstance(other, Rocket):
16
+ return NotImplemented
17
+ return (self.x, self.y) == (other.x, other.y)
18
+
19
+ def __str__(self):
20
+ return f"A Rocket positioned at ({self.x}, {self.y})"
21
+
22
+ def __repr__(self):
23
+ return f"Rocket({self.x}, {self.y})"
24
+
25
+ class Shuttle(Rocket):
26
+ def __init__(self, x=0, y=0, flights_completed=0):
27
+ super().__init__(x, y)
28
+ self.flights_completed = flights_completed
29
+
30
+ class CircleRocket(Rocket):
31
+ def __init__(self, x=0, y=0, radius=1):
32
+ super().__init__(x, y)
33
+ if radius < 0:
34
+ raise ValueError("Radius cannot be negative.")
35
+ self.radius = radius
36
+
37
+ def get_area(self):
38
+ return pi * self.radius**2
39
+
40
+ def get_circumference(self):
41
+ return 2 * pi * self.radius
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket-package-ibrahim
3
+ Version: 0.1.0
4
+ Summary: A simple Rocket simulation package
5
+ License-File: LICENSE.txt
6
+ Dynamic: license-file
7
+ Dynamic: summary
@@ -0,0 +1,7 @@
1
+ rocket/__init__.py,sha256=tUWyfDhkPM1ICU4jZwkxvfbAD1viGnqVQil-hYSvHRo,49
2
+ rocket/rocket.py,sha256=r7dXMHyuRIlDIjkraQwmR0jd6TMARqKbF1hjir7Vb3E,1189
3
+ rocket_package_ibrahim-0.1.0.dist-info/licenses/LICENSE.txt,sha256=ruwGgQeOhQiuNz5EjUM3YKEgxvya15AFWs1ehyR9UiU,1092
4
+ rocket_package_ibrahim-0.1.0.dist-info/METADATA,sha256=N1_saDcH3GjlosvOEVqWX8SQPex5mHRyZWfLpIX0nU4,182
5
+ rocket_package_ibrahim-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ rocket_package_ibrahim-0.1.0.dist-info/top_level.txt,sha256=iuGgWVgdNIZpR_FKX9YIEjWhtHhHoT4EJNDTvYSLF8Y,7
7
+ rocket_package_ibrahim-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Belhamri Ibrahim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ rocket