[CP114] - Final Exam Guide - Ultimate 59 pages long Study Guide!

135 views59 pages
School
Course
Professor

Document Summary

Data structure: is a group of related data items. Organizes data in a program lists and tuples are simple python data structures. Packages a collection of entities and controls on how to use entities a program is modular if it is dived into well-designed modules (ex functions and main program) Also, making program as generic as possible. Hiding the internal mechanics of a module. This is to prote(cid:272)t private info (cid:272)an"t (cid:271)e a(cid:272)(cid:272)essed or modified. Grouping of data entity and its associated methods together in a module. A data entity plus a set of methods on that entity. Items are removed from priory queue in order of their priority (highest to lowest) New items can be added at any time. Items of equal priority are removed in order of their addition (first come first serve) Determine number of items in a priority queue. Check if queue is empty or not. Determine the item with highest priority without removing them.