rocket-fatima 1.0.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 fatima
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,48 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket-fatima
3
+ Version: 1.0.0
4
+ Summary: A package that simulates a rocket
5
+ Home-page: http://pypi.python.org/pypi/rocket/
6
+ Author: Fatima
7
+ Author-email: sekehalfatimazahra@gmail.com
8
+ License: LICENSE.txt
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: description
14
+ Dynamic: description-content-type
15
+ Dynamic: home-page
16
+ Dynamic: license
17
+ Dynamic: license-file
18
+ Dynamic: summary
19
+
20
+ # rocket
21
+
22
+ `rocket` is a Python library for simulating rockets and space shuttles.
23
+
24
+ ## Installation
25
+
26
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `rocket`.
27
+
28
+ ```bash
29
+ pip install rocket
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```python
35
+ import rocket
36
+
37
+ # returns a rocket positioned at (3,4)
38
+ rocket.Rocket(3, 4)
39
+
40
+ # returns a shuttle that completed 2 flights
41
+ rocket.Shuttle(0, 0, 2)
42
+
43
+ # returns the area of a circle rocket of radius 2: 12.566370614359172
44
+ rocket.circleRocket(0, 0, 2).get_area()
45
+ ```
46
+
47
+ ## License
48
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -0,0 +1,29 @@
1
+ # rocket
2
+
3
+ `rocket` is a Python library for simulating rockets and space shuttles.
4
+
5
+ ## Installation
6
+
7
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `rocket`.
8
+
9
+ ```bash
10
+ pip install rocket
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```python
16
+ import rocket
17
+
18
+ # returns a rocket positioned at (3,4)
19
+ rocket.Rocket(3, 4)
20
+
21
+ # returns a shuttle that completed 2 flights
22
+ rocket.Shuttle(0, 0, 2)
23
+
24
+ # returns the area of a circle rocket of radius 2: 12.566370614359172
25
+ rocket.circleRocket(0, 0, 2).get_area()
26
+ ```
27
+
28
+ ## License
29
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -0,0 +1 @@
1
+ from .rocket import Rocket, Shuttle, circleRocket
@@ -0,0 +1,52 @@
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
+ def __eq__(self, other_rocket):
24
+ return self.x == other_rocket.x and self.y == other_rocket.y
25
+
26
+ def __str__(self):
27
+ return f"A Rocket positioned at ({self.x},{self.y})"
28
+
29
+ def __repr__(self):
30
+ return f"Rocket({self.x},{self.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
+
40
+ import math
41
+
42
+ class circleRocket(Rocket):
43
+ # A rocket shaped like a circle of radius r.
44
+
45
+ def __init__(self, x=0, y=0, r=1):
46
+ super().__init__(x, y)
47
+ self.r = r
48
+ def get_area(self):
49
+ return math.pi * self.r ** 2
50
+
51
+ def get_circumference(self):
52
+ return 2 * math.pi * self.r
@@ -0,0 +1,48 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket-fatima
3
+ Version: 1.0.0
4
+ Summary: A package that simulates a rocket
5
+ Home-page: http://pypi.python.org/pypi/rocket/
6
+ Author: Fatima
7
+ Author-email: sekehalfatimazahra@gmail.com
8
+ License: LICENSE.txt
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: description
14
+ Dynamic: description-content-type
15
+ Dynamic: home-page
16
+ Dynamic: license
17
+ Dynamic: license-file
18
+ Dynamic: summary
19
+
20
+ # rocket
21
+
22
+ `rocket` is a Python library for simulating rockets and space shuttles.
23
+
24
+ ## Installation
25
+
26
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `rocket`.
27
+
28
+ ```bash
29
+ pip install rocket
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```python
35
+ import rocket
36
+
37
+ # returns a rocket positioned at (3,4)
38
+ rocket.Rocket(3, 4)
39
+
40
+ # returns a shuttle that completed 2 flights
41
+ rocket.Shuttle(0, 0, 2)
42
+
43
+ # returns the area of a circle rocket of radius 2: 12.566370614359172
44
+ rocket.circleRocket(0, 0, 2).get_area()
45
+ ```
46
+
47
+ ## License
48
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -0,0 +1,9 @@
1
+ LICENSE.txt
2
+ README.md
3
+ setup.py
4
+ rocket/__init__.py
5
+ rocket/rocket.py
6
+ rocket_fatima.egg-info/PKG-INFO
7
+ rocket_fatima.egg-info/SOURCES.txt
8
+ rocket_fatima.egg-info/dependency_links.txt
9
+ rocket_fatima.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,14 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name='rocket-fatima',
5
+ version='1.0.0',
6
+ author='Fatima',
7
+ author_email='sekehalfatimazahra@gmail.com',
8
+ packages=['rocket'],
9
+ url='http://pypi.python.org/pypi/rocket/',
10
+ license='LICENSE.txt',
11
+ description='A package that simulates a rocket',
12
+ long_description=open('README.md').read(),
13
+ long_description_content_type="text/markdown"
14
+ )