Lesson 00-01: Introduction to the Course

Welcome to this online interactive textbook! This book is meant to serve as an introduction to computer science through the Python programming lauguage, aligned to the new Computer Science Principles Advanced Placement test by the CollegeBoard.

This is a project created by Timothy Chen, a high school computer science teacher at the Urban Assembly Gateway School for Technology, to be used with the 10th grade Software Engineering class. He can be contacted at tchen@uagateway.org. Please feel free to reach out with suggestions, bug reports, or things that are just plain wrong that need to be fixed ASAP.

What is Computer Science?

Computer science is, at its base, the study of computation, constantly asking the question: What is computable? For example, I’m sure you could calculate the highest prime number under 10, or even 100. What about 1,000? 1,000,000? The number 1,000,000 has seven digits - as of January 2016, the largest prime number found has 22,338,618 digits. That’s quite a number.

Computer science is a very broad field that revolves around algorithms, which are just step-by-step instructions. What are these algorithms for, you might ask? For anything, from simple calculations to complex data processing, to determining which stories to show on your Facebook news feed.

Through this course, we will touch upon the basics of various introductory computer science topics, such as programming, binary and hexadecimal number systems, searching and sorting algorithms, and more.

What is Programming?

Programming is computer science - but the reverse is not true: Computer science is not programming. It was explained to me as follows: Computer science is about computation and what is computable, but how do we compute? Through programming. However, you can certainly study computer science without programming.

In this book, we use Python as our programming language. Why Python?

  • Python is a popular, powerful scripting language
  • Python code is relatively easy to read and follow along
  • It forces you to structure your code neatly (tabbing)
  • Many online tutorials and tools to help you out
  • Many libraries exist to help you do cool stuff with python

We will be using python to create text-based games and create ciphertext tools - being able to encrypt and decrypt messages, and being able to crack encrypted messages. Hopefully, through this course, you will learn to channel your creativity and your programming skills to solve problems.

How To Use This Course?

If you are using this as a self-study guide or learning material, this course is broken up into the following sections:

  • Core Programming Units
  • Core Other Units
  • Elective Programming Units

Each of the Programming Units are broken up into lessons and labs. You can visit the material in any way or order you want, but the recommended order is listed below.

  1. Core Programming Units
    • 1.1 - Python Data
    • 1.2 - Conditionals
    • 1.3 - Loops
    • 1.4 - Functions
    • 1.5 - One-Dimensional Lists#
    • 1.6 - Multi-Dimensional Lists#
    • 1.7 - Dictionaries and File I/O#
    • 1.8 - Basic Searching/Sorting Algorithms#
  2. Core Miscellaneous Units#
    • 2.1 - Number Systems in Computer Science#
    • 2.2 - The Internet#
    • 2.3 - Data and Cybersecurity#
  3. Elective Programming Units#
    • 3.1 - Recursion and Recursive Algorithms#
    • 3.2 - Object Oriented Programming#
    • 3.3 - Image Processing#
    • 3.4 - Web Scraping#
    • 3.5 - Simple Games With The pygame Library#
  4. Elective Miscellaneous Units#
    • 4.1 - History of Computing#
    • 4.2 - Version Control and Git#

# - incomplete

Highlighting Legend

Throughout this course, you might see some highlighted text.

Vocabulary word

Definition of a vocabulary word

Some stuff might not be vocab, but is really important regardless. That will be this color.

Hover over me: Some answers will go here so you can check your answer

Development Notes

  • Please contact me if your fill-in-the-blank answer is marked incorrect but you’re sure is right.
  • Some lessons will be given additional practice/checks for understanding.
Next Section - Lesson 00-02: What is Python?