Week 7
- Part 1 Profiling a program
-
- Creat a working directory week7 and download the source from week7 tutorial folder.
- install snakeviz and python profiling
- Shift+Right-Click to start command prompt in the directory created
- type "pip install snakeviz"
- type "python -m cProfile filename.py"
- type "python -m cProfile -o profile filename.py"
- type "snakeviz profile"
- Part 2 Tutorial exercises.
-
- Here are eight integers : 1, 7, 4, 8, 2, 6, 0. Use diagrams to show the steps of sorting the integers into descending order using selection,insertion,bubble,quick, and merge sort.
-
In previous implementation of our Simple Billing Application, sorting of Client List was done using
Python sorted() method
i.e. "sorted(clientDL, key = lambda c: c.name)" which requires public attribute for sorting. Write your own sorting function so that only accessor methods of Client are needed.
-
ALL group project