Dive into the world of computational problem-solving with this hands-on programming course for C++ and Python users, built on the philosophy of learning by doing. Master control structures, functions, structured data, arrays/lists, references & pointers (or object references), and static vs dynamic memory models while exploring stack and heap through visual memory diagrams.

Engage in extensive problem-solving practices and analytical exercises that strengthen logical thinking, algorithmic design, and code reusability. Experience the excitement of building many real-world projects—from Conway’s Game of Life to GOMOKU, and the final masterpiece—The Game of Chess.
A journey designed to turn programming principles into precision, creativity, and mastery, regardless of whether you code in C++ or Python.

Lecture 1: The Quest of Finding “THE ALGORITHM”

Students explore computation as a problem-solving discipline and understand what computers and algorithms are. They tackle the Heaviest Ball guessing game and analyze counting and exponential functions to understand efficiency and parallel reasoning.

  • C++: Procedural problem-solving, explicit step counting, performance-focused logic
  • Python: Algorithmic reasoning with readable syntax and abstraction for parallel problems
Lecture 2: Introduction to Programming (Table Printing)

Students write their first programs, learn Hello World, display strings and math expressions, and print tables with fixed values. Introduction to variables and iteration (while loop) sets the foundation for structured programs.

  • C++: cout, explicit types, while loops, console-based table printing
  • Python: print(), dynamic typing, indentation-based loops, formatted output
Lecture 3: Control Structures

Covers integers, operators (+,-,*,/,%), conditional statements (if/else/else-if), divisibility, compound statements (&&,||), and ASCII-based character operations. Students also implement maximum-of-five logic and compare naive vs efficient approaches.

  • C++: if/else branching, char type, ASCII handling, logical operators
  • Python: if/elif/else, string and integer operations, and/or for compound conditions
Lecture 4: Functions and Using the Power of Re-usability

Students implement digit-by-digit display using if/else and switch, learn functions as black boxes, create DigitsDisplay and PrintQuadType, design menu-based applications, and implement distance calculations. Emphasis is on avoiding code repetition through reusable functions.

  • C++: Function prototypes, pass-by-reference, structured modular functions
  • Python: def functions, default parameters, return values, modularized logic
Lecture 5: Divide and Conquer (Rock Paper Scissors & Stopwatch)

Students implement Rock Paper Scissors with input validation, replay loops, getch() and toupper for input simplification, display winning messages, and create a stopwatch utility. The lecture reinforces designing game loops and structured control flows.

  • C++: Console input/output, non-blocking input, game loop design, timing utilities
  • Python: Input validation, infinite loops, time module for stopwatch, clear game flow
Lecture 6: Designing Main Flows – Age Calculator

Students calculate age in years, months, and days from two dates, handle invalid entries, implement menu-based loops, display multiple clocks, and structure the main application flow using functions for modularization.

  • C++: Struct-based date handling, explicit validation, functional modularization
  • Python: datetime module for calculations, looped menus, modular functions
Lecture 7: Loops and Functions

Students learn for vs while, sequence printing, odd/even counting, sentinel-based input (-1), Fibonacci sequence implementation via Fib(N), function scoping, nested loops, and combining loops with functions for analytical tasks.

  • C++: Traditional loops, recursion or iterative Fibonacci, scoping rules
  • Python: for over range(), list comprehension, clean recursion or iteration
Lecture 8: Loops and Functions II & Shapes Printing

Implementation of IntegerSquareRoot, IsPerfectSquare, IsPrime (up to sqrt(N)), PythagoreanTriplets, Reverse, IsPalindrome, PrintASymbolKTimes, triangle patterns including hollow and equilateral triangles. Nested loops and functions are combined for pattern printing.

  • C++: Integer arithmetic, nested loops, modular functions for shapes
  • Python: List/loop-based utilities, string repetition, functional abstraction
Lecture 9: References, Pointers, and Arrays

Students explore memory through swap functions, pointer vs array semantics, dereferencing, indexing, finding min/max in arrays, and pointer arithmetic including memory addresses and element access.

  • C++: References, pointers, arrays, explicit memory operations
  • Python: Lists, object references, implicit memory handling, list operations
Lecture 10: Static Arrays

Students initialize arrays with sequences (0,1,2…), squares (0,1,4…), evens, random numbers, prime numbers, and implement searching: first/last index, frequency, distinct elements, and mode. const and Init() functions are introduced.

  • C++: Fixed-size arrays, const, manual traversal and search
  • Python: Lists, built-in search/count, random module, list comprehensions
Lecture 11: Animations

Students set up console windows, print with gotoRowCol(), system(“cls”), implement vertical/horizontal fans, adjust speed with Sleep(), draw circles via polar coordinates, and use structs like Position and arrays of Circle for stone-throwing animations.

  • C++: Console manipulation, struct-based animation, low-level timing
  • Python: Console libraries, sleep(), object-oriented animation
Lecture 12: Two-Dimensional Arrays and Application (Prison Break)

Students learn 1D vs 2D array mapping, implement matrices (add, subtract, multiply, transpose), use struct Matrix, and apply it in “Prison Break” to trace prisoner destiny from top-left to bottom-right corners.

  • C++: 2D arrays, struct-based matrices, explicit indexing
  • Python: List-of-lists, matrix operations via loops or libraries
Lecture 13: Dynamic Memory Allocation

Explores limitations of static arrays, pointers, memory segments (Code, Global, Heap, Stack), and dynamic array allocation (Print, AllocateArray, LoadArray). Students manage memory at runtime and create growable arrays.

  • C++: new/delete, pointers for dynamic arrays, manual memory management
  • Python: Lists with dynamic resizing, automatic memory management
Lecture 14: Dynamic Memory Allocation II

Students implement struct SET (name, Size, pointer array Vs), Print, LoadArray, LoadArrayFromFile, Search, UnionSet, and dynamically allocated 2D arrays (struct MATRIX). File I/O and set/matrix operations reinforce abstraction.

  • C++: Pointer-based structs, file streams, dynamic 2D arrays
  • Python: Classes, lists, file I/O, dynamic memory abstraction
Lecture 15: Conway’s Game of Life

Students implement main loop, Init(), RepopulateWorld(), DisplayWorld() with char World[Rows][Cols]. They learn nested loops, game logic evolution, neighbor rules, visualizing living/dead cells, and interactive control with mouse painting.

  • C++: 2D arrays, loop-based state updates, console rendering
  • Python: List-of-lists, iteration over grids, visualization libraries
Lecture 16A: GOMUKO – A Generalized Tic-Tac-Toe

Students implement multiplayer board, dynamic char** board, divide-and-conquer game flow, move validation, and utility functions like DoIWinHorizontally, DoIWinVertically, DoIWinDiagonally.

  • C++: Pointer-based dynamic board, function decomposition
  • Python: List-based board, modular functions, clean abstractions
Lecture 16B: GOMUKO – AI Version (Human vs Computer)

Extends the game with AI logic, move generation, evaluation, memory diagrams of heap vs stack, and file I/O for game state persistence. Students learn state-based AI programming.

  • C++: Pointer-driven state, efficient AI computations, file streams
  • Python: Object-oriented AI, heuristic evaluation, file serialization
Lecture 17: Nokia Snake Game – Project

Students implement non-blocking input (_kbhit(), getch()), design Snake struct, manage dynamic board movement, collision detection, growth, walls, food generation, modular design, and memory management.

  • C++: Structs, dynamic arrays, non-blocking console input
  • Python: Classes, lists, event-driven input handling
Lecture 18: Final Project – The Game of Chess (Phase 0)

Focuses on board and piece representation, memory requirements, 8×8 grid initialization, user input coordinates, validation for legal destination/opponent pieces, and turn management.

  • C++: 2D char board, procedural initialization, pointer-based turn tracking
  • Python: List-of-lists board, object-oriented pieces, clean validation
Lecture 19: Final Project – The Game of Chess (Phase 1)

Students will  implement movement legality, six utility functions (IsHorizontalMove, IsVerticalMove, IsDiagonalMove and their 3 respective path clear functions). Later using those 6 functions build every piece-specific checks (IsRookLegalMove, IsQueenLegalMove), a unified LEGALITYCHECK, and memory diagrams for board state.

  • C++: Function-based checks, pointer-driven board state
  • Python: Class-based pieces, modular validation functions
Lecture 20: Final Project – The Game of Chess (Phase 2)

Students will implement pawn promotion, save & exit, replay, undo, restart without saving, check, castling, checkmate, stalemate rules, and detect illegal moves (including those leaving the king in check). Integration of all modules, memory mapping, pointers, and dynamic state ensures a fully functional system.

  • C++: Pointer-based memory management, manual save/load, dynamic state tracking
  • Python: State management, serialization-based save/load, undo/replay handling