...
 
Commits (3)
from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='sorting_algorithms_v3',
version='0.1',
description='sorting algorithms in python3',
......
......@@ -7,5 +7,3 @@ def bubbleSort(alist):
alist[i] = alist[i + 1]
alist[i + 1] = temp
return alist
......@@ -10,4 +10,3 @@ def insertionSort(alist):
alist[position] = currentvalue
return alist
This package has several sorting algorithms in python3.
ENJOY!
\ No newline at end of file
This package has several sorting algorithms in python3.7.
To use (with caution), simply do::
>>> import sorting_algorithms_v3
>>> print sorting_algorithms_v3.bubbleSort()
>>> print sorting_algorithms_v3.insertionSort()
>>> print sorting_algorithms_v3.selectionSort()
>>> print sorting_algorithms_v3.quick_sort()
ENJOY!
......@@ -9,5 +9,3 @@ def selectionSort(alist):
alist[fillslot] = alist[positionOfMax]
alist[positionOfMax] = temp
return alist
......@@ -3,12 +3,10 @@ class Bookshelf:
self.books=books
self.book_storage = []
self.add_book()
#method to add books to bookshelf (book_storage)
def add_book(self):
for x,y in self.books:
self.book_storage.append(Book(x,y))
for book in self.book_storage:
print (book)
......
......@@ -33,8 +33,8 @@ class Restaurant:
def print_check(self,client):
total=0
# this code is just to assure the customer name will be printed only once
if len(list(zip(*self.order))[0]) > 0: #zip retrieves the first element accross a lists and returns a list with them
print(f" Customer {client} \n ")
#if len(list(zip(*self.order))[0]) > 0: #zip retrieves the first element accross a lists and returns a list with them
# print(f" Customer {client} \n ")
#end
for order in self.order:
if order[0] == client:
......
.idea
.DS_Store
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.7 (week3day5.1)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (week3day5.1)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/DAy5.iml" filepath="$PROJECT_DIR$/.idea/DAy5.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
name:
dependencies:
- python==3.7
- pip:
- django==2.2.1
- flake8