Computing Concepts With Python

An interactive textbook teaching basic concepts of computer science and programming.

This project is maintained by brendanpshea

Computing Concepts With Python

Brendan Shea, PhD | Brendan.Shea@rctc.edu

Welcome to Computing Concepts with Python, an open-access textbook designed to introduce students to the foundational concepts of computer science. The textbook includes Jupyter notebooks with interactive exercises, real-world examples, and practical coding exercises using Python.

Chapters

0. Introduction to Colab

Open In Colab
This chapter introduces you to Google Colab, the platform you will be using for running Python code in this textbook. You’ll learn the basics of working in Colab, including writing code, adding markdown cells, and running Jupyter notebooks.

1. Computers and Hardware

Open In Colab
An introduction to the fundamental concepts of computer hardware, covering components such as CPUs, memory, and storage. This chapter also discusses how computers process information and introduces basic hardware terminology.

2. File Formats and Pac-Man

Open In Colab
This chapter uses the classic game Pac-Man to explore different file formats and how they store data. You will learn about text-based formats like CSV and JSON, as well as binary formats used in games and multimedia.

3. Networks

Open In Colab
This chapter introduces the basics of computer networks, including how computers communicate over the internet, IP addresses, and the structure of the web. You’ll also explore the protocols that power network communication.

4. Introduction to Python Strings

Open In Colab
Learn the fundamentals of Python programming, starting with string manipulation. You will practice creating, modifying, and analyzing strings using Python, and apply these skills to simple text-based tasks.

5. Integers, Floats, and Functions

Open In Colab
This chapter focuses on numerical data types in Python—integers and floats. You’ll also learn about functions, how to define them, and how to use them to organize and reuse your code.

6. Conditionals and Logic

Open In Colab
An introduction to conditional statements and logical operators in Python. This chapter teaches you how to write code that can make decisions based on conditions, including working with if, else, and elif statements.

7. Algorithms and Loops

Open In Colab
Learn about algorithms and how to implement them using loops in Python. This chapter covers for and while loops, helping you to automate repetitive tasks and develop efficient algorithms for problem-solving.

8. Cybersecurity

Open In Colab
An introduction to cybersecurity concepts, including encryption, data privacy, and security vulnerabilities. You’ll explore real-world examples of security breaches and learn how to protect data in the digital world.

9. Data and Databases

Open In Colab
This chapter introduces you to the world of data and databases. You will learn how data is stored, accessed, and manipulated using databases like SQLite, and practice writing simple queries to retrieve data.

10. Dictionaries, Objects, and Tests

Open In Colab
Learn about Python dictionaries and how to work with objects in Python. This chapter also introduces the concept of unit testing and how to ensure your code is functioning as expected.

11. The Birth of AI

Open In Colab
Explore the history and development of artificial intelligence. This chapter provides a broad overview of AI’s origins, key milestones, and current trends in machine learning and intelligent systems.

12. Neural Networks

Open In Colab
An introduction to neural networks and how they power modern AI. You’ll learn about the structure and function of neural networks, and apply these concepts to build a simple neural network using Python libraries.

License

This open-access textbook is licensed under the MIT License. For more details, refer to the LICENSE file in this repository.


I hope you find this textbook useful and encourage you to explore the various chapters in an interactive way through the provided Colab links.

A Note on the Use of AI Tools. These chapters were intitially developed as the “generative AI” explosion took off (staring with OpenAI’s GPT 3.0), and I’ve had fun experimenting with many of these tools—including successive versions of ChatGPT, Google Gemini, Claude, CoPilot, Mistral, and others—in helping to turn my (voluminous, but often unorganized) lecture notes into something resembling a proper book. My experience was these tools with these has been generally positive, and I think that they can someday do at least some of the work done by traditional editors and publishing houses (I say this as a former editor at an academic press!). I’m less convinced they are going to immediately replace the actual writer or programmer, though, as there’s still a fair amount of expertise (and effort!) into producing quality, meaningful output.

About the Author

Brendan Shea, PhD, is Professor of Philosophy and Computer Science at Rochester Community and Technical College and a Resident Fellow at the Minnesota Center for Philosophy of Science at the University of Minnesota-Twin Cities. He also serves as the Public Member of the Institutional Biosafety Committee at Mayo Clinic-Rochester. His main research and teaching interests lie in the philosophy of science, data modeling, applied ethics, and in the areas where these overlap (such as bioethics and the ethics of artificial intelligence). You can find out more about his research here: https://philpeople.org/profiles/brendan-shea.