rocket20 1.0.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
+ import rocket
rocket/rocket.py ADDED
@@ -0,0 +1,39 @@
1
+ from math import sqrt
2
+
3
+ class Rocket():
4
+ # Rocket simulates a rocket ship for a game,
5
+ # or a physics simulation.
6
+
7
+ def __init__(self, x=0, y=0):
8
+ # Each rocket has an (x,y) position.
9
+ self.x = x
10
+ self.y = y
11
+
12
+ def move_rocket(self, x_increment=0, y_increment=1):
13
+ # Move the rocket according to the paremeters given.
14
+ # Default behavior is to move the rocket up one unit.
15
+ self.x += x_increment
16
+ self.y += y_increment
17
+
18
+ def get_distance(self, other_rocket):
19
+ # Calculates the distance from this rocket to another rocket,
20
+ # and returns that value.
21
+ distance = sqrt((self.x-other_rocket.x)**2+(self.y-other_rocket.y)**2)
22
+ return distance
23
+
24
+ def __str__(self):
25
+ return f"A Rocket positioned at ({self.x},{self.y})"
26
+
27
+ def __repr__(self):
28
+ return f"Rocket({self.x},{self.y})"
29
+ def __eq__(self,other):
30
+ return (self.x == other.x) and (self.y == other.y)
31
+
32
+ class Shuttle(Rocket):
33
+ # Shuttle simulates a space shuttle, which is really
34
+ # just a reusable rocket.
35
+
36
+ def __init__(self, x=0, y=0, flights_completed=0):
37
+ super().__init__(x, y)
38
+ self.flights_completed = flights_completed
39
+
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket20
3
+ Version: 1.0.0
4
+ Summary: An awesome package that does something
5
+ Home-page: http://pypi.python.org/pypi/<your_package_name>/
6
+ Author: malek20
7
+ Author-email: a.zehraoui@esi-sba.dz
8
+ License: LICENSE.txt
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: rocket
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: description
15
+ Dynamic: description-content-type
16
+ Dynamic: home-page
17
+ Dynamic: license
18
+ Dynamic: license-file
19
+ Dynamic: requires-dist
20
+ Dynamic: summary
21
+
22
+ # package_name
23
+
24
+ `package_name` is a Python library for rocket
25
+
26
+ ## Installation
27
+
28
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `package_name`.
29
+
30
+ ```bash
31
+ pip install package_name
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```python
37
+ import package_name
38
+
39
+ # returns 'words'
40
+ package_name.module_name('word')
41
+
42
+ # returns 'geese'
43
+ package_name.module_name('goose')
44
+
45
+ # returns 'phenomenon'
46
+ package_name.module_name('phenomena')
47
+ ```
48
+
49
+ ## License
50
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -0,0 +1,7 @@
1
+ rocket/__init__.py,sha256=OVg_klU3vMPVS_KlhcEU1WM1B5moDYWhYUHXQhZdpUg,13
2
+ rocket/rocket.py,sha256=iyeujU0NJCokS5MlT4NIsosIlNYWJsupDIG0gnZkxAk,1255
3
+ rocket20-1.0.0.dist-info/licenses/LICENSE.txt,sha256=BMR05oigbIjF9LQxEVYpC5owkc_xdStWTq_-Psp5jkw,1075
4
+ rocket20-1.0.0.dist-info/METADATA,sha256=YFy7WoxuowGEQPoJ6VXJKhpI7a8IV4ODiuSFWg5Aabs,992
5
+ rocket20-1.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ rocket20-1.0.0.dist-info/top_level.txt,sha256=iuGgWVgdNIZpR_FKX9YIEjWhtHhHoT4EJNDTvYSLF8Y,7
7
+ rocket20-1.0.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 Zehraoui abdelmalek
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