Summary T1ACD2- Computational Thinking (Python Basics) - Code Cheat Sheet & Algorithms
Essential Python Cheat Sheet for Computational Thinking Are you learning Python for the first time or preparing for your Computational Thinking exam? This concise cheat sheet cuts through the noise and gives you exactly the syntax and algorithms you need to memorize. It's not just a list of commands; it includes full code snippets for common exam problems involving matrices and lists. Key Concepts Covered: File Handling: `open()`, `read()`, `readlines()`, and closing files correctly. Core Modules: `math`, `random`, `copy` (deepcopy vs shallow copy), and `time`. Data Structures: List manipulation, slicing (`list[start:stop:step]`), sorting, and searching. Standard Functions: Type conversion (`int`, `float`, `str`), `round()`, `abs()`, `all()`, `any()`. Algorithm Examples (Ready-to-Use Code): Matrix Operations: How to Transpose a Matrix (swap rows/cols). How to perform Matrix Multiplication (nested loops logic). A custom `pretty_printer` function for displaying grids clearly. Image/Grid Manipulation: Vertical & Horizontal Mirroring of a 2D list (picture). Shifting elements left or right (padding with empty strings). Features: * Syntax highlights for quick lookup. * Focus on nested loops and 2D array logic (often the hardest part of intro exams). * Perfect for quick revision before a coding test. Disclaimer: These are personal student summary notes intended to supplement your course materials, not to replace official documentation or lectures.
Geschreven voor
Documentinformatie
- Geüpload op
- 15 januari 2026
- Aantal pagina's
- 2
- Geschreven in
- 2025/2026
- Type
- Samenvatting
Onderwerpen
- python basics
- computational thinking
- algorithms
- coding cheat sheet
- list slicing
- 2d arrays
- programming summary
-
exam prep
-
matrix multiplication python