Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/rst/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ We will break this program into two parts:

1. A user-defined function that generates a list of random variables.
1. The main part of the program that
1. calls this function to get dat
1. plots the dat
1. calls this function to get data
1. plots the data

This is accomplished in the next program

Expand Down
12 changes: 6 additions & 6 deletions source/rst/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ single: Python

In this lecture, you will learn how to

1. get a Python environment up and runnin
1. get a Python environment up and running
1. execute simple Python commands
1. run a sample program
1. install the code libraries that underpin these lectures
Expand All @@ -43,7 +43,7 @@ The best such distribution is [Anaconda](https://www.anaconda.com/what-is-anacon

Anaconda is

* very popul
* very popular
* cross-platform
* comprehensive
* completely unrelated to the Nicki Minaj song of the same name
Expand Down Expand Up @@ -126,7 +126,7 @@ Once you have installed Anaconda, you can start the Jupyter notebook.

Either

* search for Jupyter in your applications menu, o
* search for Jupyter in your applications menu, or
* open up a terminal and type `jupyter notebook`
* Windows users should substitute "Anaconda command prompt" for "terminal" in the previous line.

Expand All @@ -139,7 +139,7 @@ If you use the second option, you will see something like this
The output tells us the notebook is running at `http://localhost:8888/`

* `localhost` is the name of the local machine
* `8888` refers to [port number](https://en.wikipedia.org/wiki/Port_%28computer_networking%29) 8888 on your compute
* `8888` refers to [port number](https://en.wikipedia.org/wiki/Port_%28computer_networking%29) 8888 on your computer

Thus, the Jupyter kernel is listening for Python commands on port 8888 of our local machine.

Expand Down Expand Up @@ -196,10 +196,10 @@ This means that the effect of typing at the keyboard **depends on which mode you
The two modes are

1. Edit mode
* Indicated by a green border around one cell, plus a blinking curso
* Indicated by a green border around one cell, plus a blinking cursor
* Whatever you type appears as is in that cell
1. Command mode
* The green border is replaced by a grey (or grey and blue) borde
* The green border is replaced by a grey (or grey and blue) border
* Keystrokes are interpreted as commands --- for example, typing b adds a new cell below the current one

To switch to
Expand Down
2 changes: 1 addition & 1 deletion source/rst/need_for_speed.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ libraries are
For us, there's another (relatively new) library that will also be essential for
numerical computing:

* Numb
* Numba

Over the next few lectures we'll see how to use these libraries.

Expand Down
4 changes: 2 additions & 2 deletions source/rst/numpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ NumPy arrays are somewhat like native Python lists, except that

The most important of these dtypes are:

* float64: 64 bit floating-point numbe
* int64: 64 bit intege
* float64: 64 bit floating-point number
* int64: 64 bit integer
* bool: 8 bit True or False

There are also dtypes to represent complex numbers, unsigned integers, etc.
Expand Down
4 changes: 2 additions & 2 deletions source/rst/oop_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Consider the following expression

Here we are mixing types, and it's unclear to Python whether the user wants to

* convert `'300'` to an integer and then add it to `400`, o
* convert `'300'` to an integer and then add it to `400`, or
* convert `400` to string and then concatenate it with `'300'`

Some languages might try to guess but Python is *strongly typed*
Expand Down Expand Up @@ -239,7 +239,7 @@ This includes not just lists, strings, etc., but also less obvious things, such

* functions (once they have been read into memory)
* modules (ditto)
* files opened for reading or writin
* files opened for reading or writing
* integers, etc.

Consider, for example, functions.
Expand Down
2 changes: 1 addition & 1 deletion source/rst/pandas.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Just as [NumPy](http://www.numpy.org/) provides the basic array data type plus c

1. defines fundamental structures for working with data and
1. endows them with methods that facilitate operations such as
* reading in dat
* reading in data
* adjusting indices
* working with dates and time series
* sorting, grouping, re-ordering and general data munging
Expand Down
4 changes: 2 additions & 2 deletions source/rst/python_advanced_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ for line in f:
The interpreter just keeps

1. calling `f.__next__()` and binding `line` to the result
1. executing the body of the loo
1. executing the body of the loop

This continues until a `StopIteration` error occurs.

Expand Down Expand Up @@ -800,7 +800,7 @@ var([1])
The advantage is that we can

* fail early, as soon as we know there will be a problem
* supply specific information on why a program is failin
* supply specific information on why a program is failing

### Handling Errors During Runtime

Expand Down
14 changes: 7 additions & 7 deletions source/rst/python_oop.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In an earlier lecture, we learned some foundations of object-oriented programmin

The objectives of this lecture are

* cover OOP in more dept
* cover OOP in more depth
* learn how to build our own objects, specialized to our needs

For example, you already know how to
Expand All @@ -32,14 +32,14 @@ For example, you already know how to

So imagine now you want to write a program with consumers, who can

* hold and spend cas
* hold and spend cash
* consume goods
* work and earn cas
* work and earn cash

A natural solution in Python would be to create consumers as objects with

* data, such as cash on hand
* methods, such as `buy` or `work` that affect this dat
* methods, such as `buy` or `work` that affect this data

Python makes it easy to do this, by providing you with **class definitions**.

Expand Down Expand Up @@ -91,7 +91,7 @@ A *class definition* is a blueprint for a particular class of objects (e.g., lis
It describes

* What kind of data the class stores
* What methods it has for acting on these dat
* What methods it has for acting on these data

An *object* or *instance* is a realization of the class, created from the blueprint

Expand Down Expand Up @@ -363,7 +363,7 @@ k_{t+1} = \frac{s z k_t^{\alpha} + (1 - \delta) k_t}{1 + n}
Here

* $s$ is an exogenously given saving rate
* $z$ is a productivity paramete
* $z$ is a productivity parameter
* $\alpha$ is capital's share of income
* $n$ is the population growth rate
* $\delta$ is the depreciation rate
Expand Down Expand Up @@ -564,7 +564,7 @@ plt.show()

The next program provides a function that

* takes an instance of `Market` as a paramete
* takes an instance of `Market` as a parameter
* computes dead weight loss from the imposition of the tax

```{code-block} python3
Expand Down
2 changes: 1 addition & 1 deletion source/rst/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You also need to keep the external code libraries, such as [QuantEcon.py](https:

For this task you can either

* use conda upgrade quantecon on the command line, o
* use conda upgrade quantecon on the command line, or
* execute !conda upgrade quantecon within a Jupyter notebook.

If your local environment is still not working you can do two things.
Expand Down