Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed minor typos #133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
20 changes: 10 additions & 10 deletions notebooks/classes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment"
Expand All @@ -967,7 +967,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The paremeters for the move() method are named x_increment and y_increment rather than x and y. It's good to emphasize that these are changes in the x and y position, not new values for the actual position of the rocket. By carefully choosing the right default values, we can define a meaningful default behavior. If someone calls the method move_rocket() with no parameters, the rocket will simply move up one unit in the y-direciton. Note that this method can be given negative values to move the rocket left or right:"
"The parameters for the move() method are named x_increment and y_increment rather than x and y. It's good to emphasize that these are changes in the x and y position, not new values for the actual position of the rocket. By carefully choosing the right default values, we can define a meaningful default behavior. If someone calls the method move_rocket() with no parameters, the rocket will simply move up one unit in the y-direciton. Note that this method can be given negative values to move the rocket left or right:"
]
},
{
Expand Down Expand Up @@ -999,7 +999,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1064,7 +1064,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1120,7 +1120,7 @@
"\n",
"#### Rocket Attributes\n",
"- Start with a copy of the Rocket class, either one you made from a previous exercise or the latest version from the [last section](#adding_method).\n",
"- Add several of your own attributes to the \\_\\_init\\_\\_() function. The values of your attributes can be set automatically by the \\_\\_init\\_\\_ function, or they can be set by paremeters passed into \\_\\_init\\_\\_().\n",
"- Add several of your own attributes to the \\_\\_init\\_\\_() function. The values of your attributes can be set automatically by the \\_\\_init\\_\\_ function, or they can be set by parameters passed into \\_\\_init\\_\\_().\n",
"- Create a rocket and print the values for the attributes you have created, to show they have been set correctly.\n",
"- Create a small fleet of rockets, and set different values for one of the attributes you have created. Print the values of these attributes for each rocket in your fleet, to show that they have been set properly for each rocket.\n",
"- If you are not sure what kind of attributes to add, you could consider storing the height of the rocket, the crew size, the name of the rocket, the speed of the rocket, or many other possible characteristics of a rocket.\n",
Expand Down Expand Up @@ -1213,7 +1213,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1360,7 +1360,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1488,7 +1488,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1599,7 +1599,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down Expand Up @@ -1692,7 +1692,7 @@
" self.y = y\n",
" \n",
" def move_rocket(self, x_increment=0, y_increment=1):\n",
" # Move the rocket according to the paremeters given.\n",
" # Move the rocket according to the parameters given.\n",
" # Default behavior is to move the rocket up one unit.\n",
" self.x += x_increment\n",
" self.y += y_increment\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, x=0, y=0):
self.y = y

def move_rocket(self, x_increment=0, y_increment=1):
# Move the rocket according to the paremeters given.
# Move the rocket according to the parameters given.
# Default behavior is to move the rocket up one unit.
self.x += x_increment
self.y += y_increment
Expand Down
2 changes: 1 addition & 1 deletion notebooks/terminal_apps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@
"source": [
"Basic Pickling\n",
"---\n",
"When we \"pickle\" something in the physical world, we soak it in salt and vinegar so it won't rot. \"Pickling\" an object in Python packages it up and stores it on disk in a way that we can get it back in its original form later. You don't want to use `pickle` for imporant data, but it's a good way to get started with storing data after your program closes.\n",
"When we \"pickle\" something in the physical world, we soak it in salt and vinegar so it won't rot. \"Pickling\" an object in Python packages it up and stores it on disk in a way that we can get it back in its original form later. You don't want to use `pickle` for important data, but it's a good way to get started with storing data after your program closes.\n",
"\n",
"Here is a simple program that asks the user for some input, and then stores the input in a list. The program dumps the list to a file using `pickle`, and the next time the program runs it loads that data back in. Run this program on your computer, and see if it works for you."
]
Expand Down