Editor
ThePythonBook

Computer Science Principles

Binary and data, the internet, algorithms, the limits of computing and its impact, taught with Python

05Stage 5 of the roadmap: Choose Your Path
18tutorials
39exercises
635minutes
755XP
18 tutorials in this category

Program Design and Testing: Plan, Build and Debug Code

How programmers collaborate, design from user needs, document and credit code, and find syntax, run-time, logic and overflow errors with tests and debugging.

beginner35m335

Developing Algorithms: Pseudocode, MOD, and Building Blocks

Write algorithms in plain words, flowcharts, pseudocode and Python, evaluate MOD expressions, and build new algorithms from max, sum and divisibility checks.

beginner35m045

Linear Search and Binary Search: Counting the Checks

Compare linear search and binary search in Python and exam pseudocode: traverse lists, count binary search iterations, and see why the data must be sorted.

beginner35m045

Grid Robot Algorithms: MOVE_FORWARD, ROTATE and CAN_MOVE

Solve exam-style robot grid questions: trace MOVE_FORWARD, ROTATE_LEFT, ROTATE_RIGHT and CAN_MOVE, and run every path on a small Python grid robot.

beginner35m045

Random Values and Simulations: RANDOM(a, b) in Python

Work out the possible values of RANDOM(a, b) expressions, match them to Python's random.randint, and build coin, dice and rumor simulations to see their limits.

beginner35m045

Binary Numbers and Bits: How Computers Represent Data

Learn how computers store numbers, text and color as bits. Convert binary to decimal and back, compare binary numbers, and see overflow and round-off in Python.

beginner40m455

Data Compression: Lossless vs Lossy, with Run-Length Encoding

Learn how compression shrinks data, why redundancy matters, and when to pick lossless or lossy. Build a run-length encoder in Python and measure the saving.

beginner35m340

Extracting Information from Data: Cleaning, Filtering and Metadata

Turn raw data into information with Python: clean messy entries, combine sources, filter and transform records, read metadata, and spot bias and false causes.

intermediate50m450

How the Internet Works: Networks, Packets and Protocols

Learn how devices form networks, how packets find a path, and what IP, TCP, UDP and HTTP do. See how the Internet differs from the web, with Python demos.

beginner40m340

Fault Tolerance and Redundancy: How the Internet Survives Failures

See how redundancy and multiple paths keep the Internet running when parts fail. Model a network in Python, test connections and find single points of failure.

intermediate35m345

Algorithmic Efficiency and Heuristics: Reasonable and Unreasonable Time

Count the steps an algorithm takes, tell reasonable running times from unreasonable ones, and see when a heuristic route beats checking every possible route.

intermediate35m045

Undecidable Problems: Questions No Program Can Always Answer

Decidable vs undecidable problems explained with Python: why no program can tell whether every other program stops, and how some instances still have answers.

intermediate25m225

Parallel and Distributed Computing: Speedup and Its Limits

Compare sequential, parallel and distributed computing. Work out run times from task lists, calculate the speedup, and see why the sequential part sets a limit.

intermediate35m345

Effects of Computing: Benefits, Harms and the Digital Divide

How one computing innovation can help and harm at once, how inventions get used in ways nobody planned, and what causes the digital divide in internet access.

beginner30m340

Computing Bias and Crowdsourcing: Unfair Data, Shared Effort

See how bias gets into algorithms and data, test a toy model that fails an under-represented group, and learn how citizen science and crowdfunding work.

beginner30m340

Legal and Ethical Concerns: Copyright, Plagiarism and Open Licenses

Who owns digital work, what counts as plagiarism, how Creative Commons, open source and open access make reuse legal, and when computing raises ethical issues.

beginner30m340

Safe Computing: Privacy, Passwords, Encryption and Phishing

What personal data apps collect, how strong passwords and multifactor authentication work, why encryption needs huge key spaces, and how phishing works.

beginner40m350

Exam Pseudocode in Python: Every Construct Side by Side

Read Computer Science Principles exam pseudocode with confidence: assignment, DISPLAY, lists that start at 1, REPEAT UNTIL and procedures, each next to Python.

beginner35m225