Python Programming Learning Areas Flashcards
The Different Learning Sections
- Objects, Data Structures, & Data Types
- Operators
- Methods, Functions, & Built-In Function
- OPP, Classes & Inheritances
- Error & Exception Handling
- Decorators & Generators
4 Built-In Data Structures
(come back to user-defined data structures at a later date)
Built-In Data Structures:
List, Dictionaries, Tuples, Sets,
User Defined Data Structures:
Arrays, Stacks, Queue, Trees, Linked List, Graphs, HashMaps
5 Data Types in Python
- str: string, text
- int: integer
- float: any number any partial numbers (10.5)
- complex: complex number (24j)
- bool: boolean
3 Control Flow Statements
3 Control Flow Tools
- for loops
- while loops
- if…elif…else statement
control flow tools utilized within loops
- break
- continue
- pass
Different Operators:
Assignment & Boolean
Logical & Membership & Identity
Assignment: (=, +=, -=, *=, /=, %=, **=, //=)
Boolean: (==, !=/<>, >, =, <=)
Logical: and, or, not
Membership: in, not in
Identity: is, is not
Functions v. Methods
Functions: block of code to perf. a spec. task
def func_name ( arg1, arg2 ) :
func_body
Method: block fo code assigned to a specfic class, accessible to data contained within the class. Cannot be accessed by objects not a member of the class.
class class_name:
def method_name ( arg1, arg2 ) :
method_body