You updated your password.

Reset Password

Enter the email address you used to create your account. We will email you instructions on how to reset your password.

Forgot Your Email Address? Contact Us

Reset Your Password


How to Program: Computer Science Concepts and Python Exercises

Learn one of the world's most accessible computer languages, Python 3, from a professor at a top ranked university.
How to Program: Computer Science Concepts and Python Exercises is rated 4.0 out of 5 by 192.
  • y_2024, m_7, d_17, h_6
  • bvseo_bulk, prod_bvrr, vn_bulk_3.0.42
  • cp_1, bvpage1
  • co_hasreviews, tv_18, tr_174
  • loc_en_CA, sid_9151, prod, sort_[SortEntry(order=SUBMISSION_TIME, direction=DESCENDING)]
  • clientName_teachco
  • bvseo_sdk, p_sdk, 3.2.1
  • CLOUD, getAggregateRating, 5.85ms
Rated 5 out of 5 by from Great Course! Dr. Keyser is a great teacher. A while ago I took his C++ course and now I have finished his Python course. Both are easy to understand. The Python course contains lots of pauses to write your own program and then shows a method to do it to compare.
Date published: 2023-11-14
Rated 5 out of 5 by from Good introductory course The lectures are focused on a high level, broad picture type of content. It's perfect for beginners or those that need a a refresher on the content. The instructor provides good mental models to remember the concepts.
Date published: 2023-07-01
Rated 2 out of 5 by from How to program This course needs an accurate statement of purpose. It seems designed to teach Python. As such this online method is inadequate. A purely lecture style is fine for a face-to-face classroom but a carefully worked out teaching program is essential over a computer; totally lacking here. You should certainly have the resources but you've failed to produce a product adequate for an online course. Otherwise a book is far better.
Date published: 2023-02-09
Rated 5 out of 5 by from Informative East to Follow With no previous experience of programming, I found the course easy to follow with clear instructions. I did not expect to be able to write simple programs within 4 weeks. I found the course Guidebook very helpful and supported the learning and exercises. I am very pleased with the course.
Date published: 2022-12-05
Rated 5 out of 5 by from Fantastic. Wouldn't have passed the course!! I bought this online course several months ago. Yet, I took a college course. This online Python Computer Programming course. Saved my life. It had augmented what the book didn't cover. It had code for me to use and allowed me to go over and over the basics of loops and lists, appending lists. It gave advanced information not covered in my course. Life Saver!!!
Date published: 2022-10-25
Rated 4 out of 5 by from Clear explanation The product is detailed on the aspects of Python programming. The instructor details each new concept in a way that provides continuity from one subject to the next. I enjoyed how well each example presented enforced what was being taught. I was frustrated with the online video. It went to a black screen and didn't come back. I inserted the DVD to finish the section on input/output.
Date published: 2022-09-09
Rated 5 out of 5 by from Very good introduction to Python This course covers a wide range of topics and guides students step by step through different aspects of programming with Python. Many exercises help to solidify new knowledge which later allows using these skills in a different context.
Date published: 2022-06-07
Rated 3 out of 5 by from Recommended for casual viewers only This course is vexing. Some important topics are covered well: emphasis on thorough testing as-you-go; using functions and parameter passing; classes and methods, and their relationship to "ordinary" variables and functions. But other fundamental points are completely missed: the significance of the "indented" Python code structure, the concept of program state, the importance and side effects of automatic memory management ("garbage collection") to name a few. There are some strange claims. One that really set off my alarms was that "in pretty much all of computer science" array indices begin with the value 0. Oh really? Most intensive numerical computation is done today using dialects or descendants of FORTRAN, with 1-based array indexing consistent with mathematical conventions. In languages such as Ada for safe and reliable systems, index ranges are stated explicitly so that there are no implied assumptions. The C language chose 0 as its indexing base, so that primitive microprocessors did not need extra operations to adjust "array index 1" to "storage offset 0". Many subsequent languages retained that convention. But today's computing hardware can make indexing adjustments automatically, with no added overhead -- which means that 0-based indexing is a matter of cultural inertia, not "computer science." Maybe the most serious error is repeated description of a variable as a "box with a name on it" into which you can place data. That IS precisely true in many other programming languages, but NOT in Python. In a language such as C++, defining a variable reserves a region of storage, "a box," which might or might not contain anything. Operations can be used to "obtain the storage location" (pointer) or to reinterpret data content (type casts) -- neither of which has any meaning in Python. As the Python reference manual states: "Names are introduced by name binding operations." In other words, where other languages reserve a box with a name, and insert data, Python constructs a box with data and attaches a name. This might seem subtle, but it has broad implications for data storage management, and can seriously confuse someone who is familiar with how other programming languages work. There are also annoying errors. For example, what was called a "functional" programming style is more properly categorized as "procedural" or "imperative." In lecture 15, the coding example applies a "self.increase_button" method twice, but no "self.decrease_button" method. Or in the discussion of a range construct, the upper range limit is verbally described multiple times (but not always!) as "does not exceed" (though the corresponding coding examples appear correct). Covering Python completely, but at an introductory level, while satisfying a diverse audience, is impossible. Thus, it is no surprise that the selection of topics will not please everybody. But whatever the choices, whatever the level, the coverage should be accurate. There are too many "oh really?" moments for my comfort. Those with more than casual interest in the subject might want to look elsewhere.
Date published: 2022-05-09
  • y_2024, m_7, d_17, h_6
  • bvseo_bulk, prod_bvrr, vn_bulk_3.0.42
  • cp_1, bvpage1
  • co_hasreviews, tv_18, tr_174
  • loc_en_CA, sid_9151, prod, sort_[SortEntry(order=SUBMISSION_TIME, direction=DESCENDING)]
  • clientName_teachco
  • bvseo_sdk, p_sdk, 3.2.1
  • CLOUD, getReviews, 11.09ms


Programming is an eminently learnable skill that gives you unrivalled problem-solving power you can apply in all areas of life. It's also a fun, creative activity that provides insight into how we control the devices that influence virtually every aspect of our lives. The 24 engaging and information-rich lessons of How to Program teach you one of the world's most accessible and powerful computer languages, Python.


John Keyser

Just as language helps us organize and describe ideas for people, programming languages help us organize and describe ideas for the computer.


Texas A&M University

Dr. John Keyser is a Professor and the Associate Department Head for Academics in the Department of Computer Science and Engineering at Texas A&M University, where he has taught since earning his Ph.D. in Computer Science from the University of North Carolina. As an undergraduate, he earned three bachelor's degrees-in Computer Science, Engineering Physics, and Applied Math-from Abilene Christian University.

Dr. Keyser's interest in computing, physics, and math steered him into a career in computer graphics, allowing him to combine all three disciplines. He has published widely on geometric modeling, physically based simulation for graphics, and a variety of other graphics topics.

Dr. Keyser's teaching ranges from introductory undergraduate courses in computing and programming to graduate courses in modeling and simulation. Among these, he created a new Programming Studio course that has become required for all Computer Science and Computer Engineering majors at Texas A&M. He has been honored three times with Texas A&M's Distinguished Achievement Award in Teaching-once at the university level and twice from the Dwight Look College of Engineering. As an Assistant Professor, he was named a Montague Scholar by the Center for Teaching Excellence. He also won the Tenneco Meritorious Teaching Award and the Theta Tau Most Informative Lecturer Award.

By This Professor

How to Program: Computer Science Concepts and Python Exercises
Introduction to C++: Programming Concepts and Applications
How to Program: Computer Science Concepts and Python Exercises


What Is Programming? Why Python?

01: What Is Programming? Why Python?

"Hello, World!" Following tradition, write a program that produces this greeting as your first exercise in coding a computer program. Learn why Python is the ideal computer language for beginners and many others. After this lesson, follow the onscreen instructions for installing Python and the programming editor PyCharm....

39 min
Variables: Operations and Input/Output

02: Variables: Operations and Input/Output

Study some of the basic operations of computers. First, investigate the memory hierarchy and what the CPU does. Then consider variables, which are like boxes where units of data are stored in a program. Look at simple arithmetic operations with variables, and try input/output commands....

37 min
Conditionals and Boolean Expressions

03: Conditionals and Boolean Expressions

Any time a computer takes different paths depending on your response, there is usually a conditional statement involved. Delve into these widely used tools, looking at branching points, comparisons, if/then statements, nesting conditionals, and Boolean (true/false) expressions....

30 min
Basic Program Development and Testing

04: Basic Program Development and Testing

Take the plunge and write a program that's useful for saving money! In the process, learn the importance of planning ahead, testing often, and building your code incrementally. As your program takes shape, Professor Keyser describes instructive incidents from computer history and his own experience....

29 min
Loops and Iterations

05: Loops and Iterations

One of the biggest thrills from writing code comes from getting a computer to perform a sequence of instructions repeatedly until a task is complete. Discover the ease of writing such loop programs and also the peril of getting stuck in infinite loops. Investigate while loops, for loops, and iterations....

28 min
Files and Strings

06: Files and Strings

Learn the fundamentals of files: what they are, how they're named, and how to interact with them. Typically, the file format that you write to and read from will be one long string-a sequence of alphanumeric characters. See how these differ from binary files such as images, which are composed of 1s and 0s....

30 min
Operations with Lists

07: Operations with Lists

Python makes it very easy to create lists and perform a wide range of operations on them. Learn the fundamentals of building lists. Then experiment with indexing into lists, looping over lists, and making slices of lists, lists of lists, and list-like structures called tuples....

30 min
Top-Down Design of a Data Analysis Program

08: Top-Down Design of a Data Analysis Program

Take what you have learned about lists, loops, files, and other techniques and design a program that lets you analyze weather data. Sound daunting? Discover the trick of top-down design, which breaks a complex task into manageable parts and is applicable not just to coding but to any major project....

28 min
Functions and Abstraction

09: Functions and Abstraction

One of the key ideas in computer science is abstraction-using simple interfaces to manage complex procedures. See how functions can simplify away the details of complex process, freeing attention to focus on what goes into a function and what comes out. Learn when to use functions and the side effects that sometimes occur....

32 min
Parameter Passing, Scope, and Mutable Data

10: Parameter Passing, Scope, and Mutable Data

Complete your introduction to elementary programming by looking at parameters-the major technique for passing information through functions. Learn when a parameter or variable is "in scope," how to work with list data that can change when passed as a parameter, and what it means for parameters to have default values....

33 min
Error Types, Systematic Debugging, Exceptions

11: Error Types, Systematic Debugging, Exceptions

Confront the nemesis of all computer programmers: bugs. First, look into the history of this peculiar term. Then take a systematic approach to solving mysterious glitches in your own programs. Get acquainted with the debugger in PyCharm, and explore strategies for tracking down bugs and fixing them....

32 min
Python Standard Library, Modules, Packages

12: Python Standard Library, Modules, Packages

Discover the remarkable programming tools called modules that you have at your fingertips with Python. Modules are ready-made programs that can be imported into your code as you write it, enhancing your creativity, expanding your options, and saving you time. Bundles of modules are called packages....

32 min
Game Design with Functions

13: Game Design with Functions

Use the knowledge you've gained so far to design a grid-based matching game-an entertaining way to practice top-down development of more complex programs using functions. You'll see how rough-and-ready lines of code known as stubs come in very handy as you tackle such projects....

31 min
Bottom-Up Design, Turtle Graphics, Robotics

14: Bottom-Up Design, Turtle Graphics, Robotics

Now experiment with bottom-up design, an approach that starts with the available elements and builds from there. Utilize a Python module called turtle graphics to model robot motion, relying on the basic turtle commands: forward, backward, and turn left or right by an angle you specify....

31 min
Event-Driven Programming

15: Event-Driven Programming

Explore the visual style of programming seen on the web and in the graphical user interface of an operating system. Get started with pyglet, a Python package created to help support development of games and other audio-visual environments. Use pyglet to make a graphical version of the game from Lesson 13....

32 min
Visualizing Data and Creating Simulations

16: Visualizing Data and Creating Simulations

Delve into data visualization and simulations-two areas where computers have had a revolutionary but under-recognized impact. Learn how to do both with matplotlib, a Python package for creating plots, graphs, and charts. Use it to design a financial simulation that can help you plan your retirement....

31 min
Classes and Object-Oriented Programming

17: Classes and Object-Oriented Programming

Learn about an exciting approach to programming called object-oriented design, which bundles functions together with data into a series of objects, whose tools and properties can be defined in a single class. Try your hand at this powerful technique by constructing a bank account program....

35 min
Objects with Inheritance and Polymorphism

18: Objects with Inheritance and Polymorphism

Dig deeper into object-oriented design, seeing how encapsulation-combining data and the functions that deal with data into a single package-is the basis for two other object-oriented features: inheritance and polymorphism. Apply these ideas to sports statistics....

33 min
Data Structures: Stack, Queue, Dictionary, Set

19: Data Structures: Stack, Queue, Dictionary, Set

Data structures allow you to perform operations more effectively. Start with two of the most basic data structures, stacks and queues, discovering that both can be executed using lists. Then move to non-linear data structures, exemplified by dictionaries and sets, which can be implemented using a hash table....

31 min
Algorithms: Searching and Sorting

20: Algorithms: Searching and Sorting

Enter the realm of algorithms, the heart of computer science. See how a well-designed algorithm-a general set of steps that accomplish a task-allows you to work out the logic of a program before you commit it to code. Try this with search and sort exercises....

30 min
Recursion and Running Times

21: Recursion and Running Times

Expand your study of algorithms to cover recursion, one of the most fascinating ideas in computer science. Apply recursion to form a pair of sorting algorithms. Then see how another approach, iteration, excels at tasks that take too long with recursion, such as calculating the Fibonacci sequence....

32 min
Graphs and Trees

22: Graphs and Trees

In computing, a graph is a mathematical structure composed of vertices and edges. Discover its incredible power to capture relationships such as the airline routes between cities and the friends in a social network. Try writing programs utilizing graphs and a special type of graph called trees....

32 min
Graph Search and a Word Game

23: Graph Search and a Word Game

Examine a famous graph algorithm called breadth-first search, which shows the shortest path connecting nodes in a tree. Use this technique to write a program creating an entertaining game, in which a word is transformed one letter at a time, with each new iteration required to be a valid word....

30 min
Parallel Computing Is Here

24: Parallel Computing Is Here

One of the major trends in the present and future of computing is parallel processing. Put this clever technique to work in Python. Then close the course with Professor Keyser's suggestions for your further explorations of programming, along with his reflections on the personal benefits of this remarkable human achievement....

35 min