PC-Python
Introduction
- 1. Introduction
- 2. Using IDLE
- 2.1. Guide to Using the Python IDLE
- 2.2. The Interactive Shell
- 2.3. The Editor (Writing Scripts)
- 2.4. Key Features
- 2.5. Common Shortcuts
- 2.6. Using the Debugger
- 2.7. Accessing the Settings
- 2.8. Setting Font Face and Size
- 2.9. Key Configuration Options
- 2.10. Key Bindings (Shortcuts)
- 2.11. Saving Your Changes
Python
Python
- 1. Python Intro
- 2. Indentation
- 3. Data Types
- 4. Operators
- 5. Arithmetic operators
- 6. Compound_assignment
- 7. Comparison operations
- 8. Logical operations
- 9. Membership operations
- 10. Identity operators
- 11. Variables
- 12. Variables Scope
- 13. Selection
- 14. Iteration
- 15. Lists
- 16. Sets
- 17. Tuples
- 18. Dictionaries
- 19. Dictionary Methods
- 20. Bytes
- 21. Bytearrays
- 22. Multiple Assignment
- 23. Unpacking iterables
- 24. Functions
- 25. Function packing and unpacking
Python examples
Advanced Python
- 1. List Comprehensions
- 2. Dictionary Comprehensions
- 2.1. Dictionary comprehension
- 2.2. Dictionary comprehension of the range function, lists and strings
- 2.3. Dictionary comprehension of zipped lists
- 2.4. Conditions in a dictionary comprehension
- 2.5. Multiple conditions in a dictionary comprehension
- 2.6. Using a condition in a dictionary comprehension with zipped lists
- 2.7. Dictionary comprehension of dictionaries
- 2.8. Dictionary comprehension of dictionaries using if-else for value
- 2.9. Dictionary comprehension of dictionaries using a function for the value
- 2.10. Dictionary comprehension of dictionary of lists
- 2.11. Dictionary comprehension of dictionary of dictionaries of lists
- 2.12. Dictionary comprehension of a list of dictionaries
- 3. Set Comprehensions
- 4. Generators
- 5. Enumerate
- 6. Match - Case
- 6.1. Match-case
- 6.2. Case Alternatives
- 6.3. Wildcard
- 6.4. Variable instead of Wildcard
- 6.5. Splitting multi-word strings into a list for complex matching
- 6.6. Splitting with the use of as to capture the alternative used
- 6.7. Guard pattern: Combing a condition in a case
- 6.8. Using the unpacking operator on a list
- 6.9. Structure Matching lists or tuples
- 6.10. Matching tuples for coordinates
- 6.11. Matching sets
- 6.12. Matching dictionaries
- 6.13. Checking Types in Python Match-Case Statements
- 7. Validation
Files
- 1. Text files
- 2. csv files
- 2.1. Header rows
- 2.2. Opening files: newline=’’
- 2.3. csv.reader
- 2.4. Reading files
- 2.5. Reading files with non comma delimiter
- 2.6. next function
- 2.7. Using an index with the row lists
- 2.8. Padded strings
- 2.9. Reading a csv file to a list
- 2.10. csv writer
- 2.11. Converting comma delimited to tab delimited files.
- 2.12. Saving a list of sublists to a csv file
- 2.13. DictReader
- 2.14. DictReading files
- 2.15. Using a key with the row dictionaries
- 2.16. DictWriter
- 2.17. DictWriter.writeheader
- 2.18. DictWriter with fieldnames
- 2.19. DictWriter with selected fieldnames
- 3. json files
- 3.1. Structure
- 3.2. Loads
- 3.3. json to dict
- 3.4. Dumps
- 3.5. Printing specific keys from json objects
- 3.6. Printing specific keys from json objects with indenting
- 3.7. Convert a dict to json
- 3.8. Convert a nested dict to json
- 3.9. Convert a nested dict to json file
- 3.10. Load
- 3.11. Loading a json file
- 3.12. Printing specific keys
- 3.13. Dump
- 3.14. dump json data to a file
- 3.15. dump json processed file data to a file
- 4. json API
- 5. xml files
- 6. File conversions
Turtle
- 1. Introduction to turtle
- 2. Turtle screen
- 3. Turtle screen advanced
- 4. Turtle drawing
- 5. Turtle square progressions
- 6. Turtle rectangle progressions
- 7. Turtle star progressions
- 8. Turtle triangle progressions
- 9. Turtle dots
- 9.1. Turtle Dots
- 9.2. Draw_dot definition: dots at a specified location
- 9.3. Using the Draw_dot definition
- 9.4. draw_dot_stack definition
- 9.5. Exploring dot stacks further
- 9.6. Icecream cones from dot stacks
- 9.7. draw_dot_stack_cone definition
- 9.8. draw_dot_stack_cone usage
- 9.9. Hexagonal array: draw_dot_centre_hexagon definition
- 10. Turtle circles
- 11. Turtle regular polygons
- 12. Turtle pie slices
- 13. Turtle shapes module
- 14. Turtle houses module
- 15. Turtle houses designs
Classes
Class exercises