Skip to content

2. Expressions, Variables, and FunctionsΒΆ

At this point, you probably think programming is as good as a calculator; you can add, subtract, multiply, divide, etc. But it is more than that. This chapter focuses on seeing programs as more than just a fancy calculator, seeing how we can manipulate values stored in variables, and create functions that can operate on parameters and return a value based on some procedure. Then later, we will use the results from 3. Control to create even more complex functions, and then the rest of these set of notes is about creating functions that solves problems.

Get back to toc CS61A.

Here are the topics we will cover:

2.1 Expressions and Variables

2.2 Defining and Using Functions