Thinking like a programmer matters more than memorizing syntax, and that philosophy shapes Introduction to Computer Science with Python, a free college-level textbook covering a complete CS1 curriculum with Python 3.12+. Designed for students in a first computer science course — declared CS majors, students exploring whether CS is for them, and non-majors who need programming skills — it requires no prior programming experience and teaches computational thinking for the AI era.
The first parts help you learn Python programming from the ground up: variables, types, and expressions; conditionals; loops; and functions. You'll then work with core data structures — strings, lists and tuples, dictionaries and sets — and file I/O, before building robust programs with error handling, modules and packages, and testing and debugging. Three chapters on object-oriented programming cover classes, inheritance and polymorphism, and OOP design, and a progressive project called TaskFlow has you grow a command-line task manager chapter by chapter.
Later parts introduce classic computer science: algorithms, recursion, searching and sorting, and data structures like stacks and queues. A real-world section covers working with data, regular expressions, libraries and environments, and web scraping and automation, while the professional practice chapters teach version control with Git and the software development lifecycle. Three capstone projects, four running examples ranging from a grade calculator to a DNA pipeline, self-assessment quizzes, and exercises at four difficulty levels round it out. Whether you're a CS major starting your degree or a self-learner writing your first program, this book builds real programming foundations.