From understanding code to writing your first program.
Day 1: The FundamentalsTinkerHub CE Karunagappally
Concept 01
Programming vs Coding
Pipeline
1. Human Idea
2. Algorithm
3. Python Code
4. Execution
Programming
The entire problem-solving architecture. Designing algorithms, structuring logic, and planning solution flow.
Coding
The literal translation step. Writing instructions in specific programming language syntax for machine execution.
Syntax Readability
High-Level vs Low-Level
Comparison
Python (High-Level)1 Line Focus
a = 5 b = 3 print(a + b)
Output: 8
✓ Human readable syntax
✓ Automatic memory management
✓ Zero boilerplate headers
C (Low-Level)Manual Mgmt
#include <stdio.h> intmain() { inta = 5, b = 3; printf("%d", a + b); return0;
}
Output: 8
✗ Complex boilerplate structure
✗ Manual type definitions
✗ Direct hardware memory control
Interpreter Architecture
How Python Runs
CPython Pipeline
Step 01
Source Code
script.py
Step 02
Tokenizer
Break Tokens
Step 03
Parser
Build AST Tree
Step 04
Compiler
Bytecode (.pyc)
Step 05
PVM
Line-by-Line Run
CPython Standard InterpreterWritten in C. Python compiles source code to intermediate bytecode before executing line-by-line via the Python Virtual Machine (PVM).
From Code to Output
Source Code Doesn't Magically Become a Result
Language Implementation
Source CodeLanguage ImplementationExecutionOutput
Source Code
The program written by a human.
Compiler
Translates source code into another representation, often machine code or an intermediate representation.
Interpreter / Runtime
Executes a program or its intermediate representation.
Real implementations can combine compilation and interpretation; they are not always mutually exclusive.
Compiled vs Interpreted
The Answer Is a Little More Interesting
CPython
Python is commonly called interpreted because developers usually run programs through a Python interpreter/runtime instead of compiling a native executable.
Standard CPython · Simplified
Python source (.py)
↓ Compilation to Python bytecode ↓ Python virtual machine Executes the bytecode
Source is commonly compiled to bytecode internally. The runtime executes that bytecode; programmers usually don't manage this themselves.
"Interpreted" does not mean "never compiled". Other Python implementations may work differently.
Conventional C Workflow
What Changes When We Run a C Program?
Toolchain
C source (.c) ↓ Compiler ↓ Native executable ↓ Operating system runs the executable ↓ Output
A conventional toolchain usually compiles and links before running.
Python, commonly via CPython
Typically run through a Python runtime
Bytecode is executed by the runtime
Quick interactive experimentation
Dynamic typing is common
C, conventional workflow
Usually compiled and linked first
Native machine code is executed
Compilation catches many errors before execution
Types are explicitly declared in ordinary C code
Compilation does not catch every bug, and both languages can be used in more varied workflows.
Next session (Day 2): Problem-solving mindset — breaking problems into steps, algorithm building, trial & error, and loops. Bring your Colab notebooks with today's practice done!