This repository gives an overview of how we can design a basic parking lot in Python. It creates parking lot with given number of slots. The cars follow Greedy approach while being parked in the slots.
index.py = Main File(The file which you have to Run) classes.py = The file where I declare and define my class and it's member function. Function.py = The file where I declare and define non member function. input.txt = The file which contains input.You can change according to your requirment.
index.py script defines the following functions -
create_parking_lot n - Given n number of slots, create a parking lot
park car_regno car_color - Parks a vehicle with given registration number and color in the nearest empty slot possible. If there are no more empty slots available, it shows a message "Sorry, parking lot is full".
status - Prints the slot number, registration number and color of the parked vehicles.
leave x - Removes vehicle from slot number x
There are few query functions to retrieve slot number from registration number of car, get registration numbers of cars with particular color etc.
index.py can be run through shell or through file containing test cases. I did with file handling, In file input.txt all the test cases are there.You just need to run index.py,the desired output will be display in your screen.
Additional Functionality :
I have added a feature by which you can extend the number of parking slot if you required at any instance of program.To perform this you will have to add a command in input file.(modify 10).This will add 10 more new slot.
I have added a feature by which You can check the available slot.To perform this you will have to add a command in input file.(display_avaiable_slot).This will show all free slot.
Metadata
Release files for parking-lot 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| parking-lot-1.0.3.tar.gz | 4.9 kB | Without provenance | Details for parking-lot-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| parking_lot-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for parking_lot-1.0.3-py3-none-any.whl |
Total release size: 10.1 kB
Release files / parking-lot-1.0.3.tar.gz
| Download URL | parking-lot-1.0.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c077db91b9c5db068a07a0d1000c76dede40b3df628ddc73c095e6c8a4b6906c
|
|
BLAKE2b-256 checksum How to use checksums |
371e5e715575cbbf71250b7ee0783794ddf863c5ff4277fc58ce29e362752c73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5
|
Release files / parking_lot-1.0.3-py3-none-any.whl
| Download URL | parking_lot-1.0.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ddec4475461529d17eff684309421b8808e9a899079da0bf99ad83ceaca9603
|
|
BLAKE2b-256 checksum How to use checksums |
3b2995d9705ee694836dd2ecf2a3dc279f7ce2b60d0580ef671d9fc7049a3e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5
|
Security for parking-lot 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.