PC-Python
Introduction
Python
Python
- 1. Python Intro
- 2. Data Types
- 3. Operators
- 4. Arithmetic operators
- 5. Compound_assignment
- 6. Comparison operations
- 7. Logical operations
- 8. Membership operations
- 9. Identity operators
- 10. Variables
- 11. Variables Scope
- 12. Selection
- 13. Iteration
- 14. Functions
- 15. Data Structures
- 16. Multiple Assignment
- 17. Unpacking iterables
- 18. Function packing and unpacking
Advanced Python
- 1. List Comprehensions
- 2. Dictionary Comprehensions
- 3. Set Comprehensions
- 4. Generators
- 5. Enumerate
- 6. Match - Case
- 6.1. Match-case
- 6.2. Case Alternatives
- 6.3. Wilcard
- 6.4. Vaiable instead of Wilcard
- 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
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