diff --git a/notebooks/classes.ipynb b/notebooks/classes.ipynb index 287f594..ce293ea 100644 --- a/notebooks/classes.ipynb +++ b/notebooks/classes.ipynb @@ -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" @@ -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:" ] }, { @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/notebooks/rocket.py b/notebooks/rocket.py index 166008b..2b53729 100644 --- a/notebooks/rocket.py +++ b/notebooks/rocket.py @@ -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 diff --git a/notebooks/terminal_apps.ipynb b/notebooks/terminal_apps.ipynb index 18c618e..b386bab 100644 --- a/notebooks/terminal_apps.ipynb +++ b/notebooks/terminal_apps.ipynb @@ -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." ]