Skip to content

Commit

Permalink
Fixed typos in the project files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexsLaboratory committed Jul 12, 2016
1 parent 7721e5e commit 6eef194
Show file tree
Hide file tree
Showing 56 changed files with 138 additions and 138 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion Advanced Lists.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"metadata": {},
"source": [
"##remove\n",
"The remove() method removes the first occurence of a value. For example:"
"The remove() method removes the first occurrence of a value. For example:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Advanced Numbers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"source": [
"#Advanced Numbers\n",
"In this lecture we will learn about a few more reperesentations of numbers in Python."
"In this lecture we will learn about a few more representations of numbers in Python."
]
},
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Advanced Sets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Great! You should now have a compelte awareness of all the methods available to you for a set object type. This data strucutre is extremely useful and is underutilized by beginners, so try to keep it in mind!\n",
"Great! You should now have a complete awareness of all the methods available to you for a set object type. This data structure is extremely useful and is underutilized by beginners, so try to keep it in mind!\n",
"\n",
"Good Job!"
]
Expand Down
6 changes: 3 additions & 3 deletions Advanced Strings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"source": [
"#Advanced Strings\n",
"String objects have a vareity of methods we can use to save time and add functionality. Lets explore some of them in this lecture:"
"String objects have a variety of methods we can use to save time and add functionality. Lets explore some of them in this lecture:"
]
},
{
Expand Down Expand Up @@ -346,7 +346,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"istitle() will return True if S is a titlecased string and there is at least one character in S, i.e. uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise."
"istitle() will return True if S is a title cased string and there is at least one character in S, i.e. uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise."
]
},
{
Expand Down Expand Up @@ -437,7 +437,7 @@
"## Built-in Reg. Expressions\n",
"Strings have some built-in methods that can resemble regular expression operations.\n",
"We can use split() to split the string at a certain element and return a list of the result.\n",
"We can use partition to return a tuple that includes the seperator (the first occurence) and the first half and the end half."
"We can use partition to return a tuple that includes the separator (the first occurrence) and the first half and the end half."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions All() and any() .ipynb → All() and any().ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"all() and any() are built-in functions in Python that allow us to convienently check for boolean matching in an iterable. all() will return True if all elements in an iterable are True. It is the same as this function code:\n",
"all() and any() are built-in functions in Python that allow us to conveniently check for boolean matching in an iterable. all() will return True if all elements in an iterable are True. It is the same as this function code:\n",
"\n",
" def all(iterable):\n",
" for element in iterable:\n",
" if not element:\n",
" return False\n",
" return True\n",
" \n",
"any() will return True if any of the elements in the iterable are True. It is equivalent to the following funciton code:\n",
"any() will return True if any of the elements in the iterable are True. It is equivalent to the following function code:\n",
"\n",
" def any(iterable):\n",
" for element in iterable:\n",
Expand Down
2 changes: 1 addition & 1 deletion Chained Comparison Operators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Note how it was true, this is beacuse with the **or** operator, we only need one *or* the other two be true. Let's see one more example to drive this home:"
"Note how it was true, this is because with the **or** operator, we only need one *or* the other two be true. Let's see one more example to drive this home:"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions Collections Module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"source": [
"#Collections Module\n",
"\n",
"The collections module is a built-in module that implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers. We've already gone over the basics: dict, list, set, and tuple.\n",
"The collections module is a built-in module that implements specialized container data types providing alternatives to Python’s general purpose built-in containers. We've already gone over the basics: dict, list, set, and tuple.\n",
"\n",
"Now we'll learn about the alternatives that the collections module provides.\n",
"\n",
"##Counter\n",
"\n",
"*Counter* is a *dict* subclass which helps count hashable objects. Inside of it elements are stored as dictionary keys and the counts of the objects are stored as the value.\n",
"*Counter* is a *dict* subclass which helps count hash-able objects. Inside of it elements are stored as dictionary keys and the counts of the objects are stored as the value.\n",
"\n",
"Lets see how it can be used:"
]
Expand Down Expand Up @@ -286,7 +286,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Can also initilaize with default values:"
"Can also initialize with default values:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Complex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"If the first parameter is a string, it will be interpreted as a complex number and the function must be called without a second parameter. The second parameter can never be a string. Each argument may be any numeric type (including complex). If imag is omitted, it defaults to zero and the constructor serves as a numeric conversion like int and float. If both arguments are omitted, returns 0j.\n",
"\n",
"If you are doing math or engineering that requires complex numbers (such as dynamics,control systems, or impedence of a circuit) this is a useful tool to have in Python.\n",
"If you are doing math or engineering that requires complex numbers (such as dynamics,control systems, or impedance of a circuit) this is a useful tool to have in Python.\n",
"\n",
"Lets see some examples:"
]
Expand Down
2 changes: 1 addition & 1 deletion Datetime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Python has the datetime module to help deal with timestamps in your code. Time values are represented with the time class. Times have attributes for hour, minute, second, and microsecond. They can also include time zone information. The arguments to initialize a time instance are optional, but the default of 0 is unlikely to be what you want.\n",
"\n",
"##time\n",
"Lets take a look at how we can extract time information from the datetime module. We can create a timestamp by specifying datetime.time(hour,minute,second,microsecond)"
"Lets take a look at how we can extract time information from the datetime module. We can create a time-stamp by specifying datetime.time(hour,minute,second,microsecond)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Decorators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"So what just happened here? A decorator simple wrapped the function and modified its behaviour. Now lets understand how we can rewrite this code using the @ symbol, which is what Python uses for Decorators:"
"So what just happened here? A decorator simple wrapped the function and modified its behavior. Now lets understand how we can rewrite this code using the @ symbol, which is what Python uses for Decorators:"
]
},
{
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions Errors and Exceptions Handling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"#Errors and Exception Handling\n",
"\n",
"In this lecture we will learn about Errors and Exception Handling in Python. You've definitely already encountered erros by this point in the course. For example:"
"In this lecture we will learn about Errors and Exception Handling in Python. You've definitely already encountered errors by this point in the course. For example:"
]
},
{
Expand Down Expand Up @@ -73,7 +73,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Content written succesfully\n"
"Content written successfully\n"
]
}
],
Expand All @@ -82,10 +82,10 @@
" f = open('testfile','w')\n",
" f.write('Test write this')\n",
"except IOError:\n",
" # This will only check for an IOError exception and then excute this print statement\n",
" # This will only check for an IOError exception and then execute this print statement\n",
" print \"Error: Could not find file or read data\"\n",
"else:\n",
" print \"Content written succesfully\"\n",
" print \"Content written successfully\"\n",
" f.close()"
]
},
Expand Down Expand Up @@ -116,10 +116,10 @@
" f = open('testfile','r')\n",
" f.write('Test write this')\n",
"except IOError:\n",
" # This will only check for an IOError exception and then excute this print statement\n",
" # This will only check for an IOError exception and then execute this print statement\n",
" print \"Error: Could not find file or read data\"\n",
"else:\n",
" print \"Content written succesfully\"\n",
" print \"Content written successfully\"\n",
" f.close()"
]
},
Expand Down Expand Up @@ -152,18 +152,18 @@
" f = open('testfile','r')\n",
" f.write('Test write this')\n",
"except:\n",
" # This will check for any exception and then excute this print statement\n",
" # This will check for any exception and then execute this print statement\n",
" print \"Error: Could not find file or read data\"\n",
"else:\n",
" print \"Content written succesfully\"\n",
" print \"Content written successfully\"\n",
" f.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Great! Now we don't actually need to memorize that list of exception types! Now what if we kept wanting to run code after the exception occured? This is where **finally** comes in.\n",
"Great! Now we don't actually need to memorize that list of exception types! Now what if we kept wanting to run code after the exception occurred? This is where **finally** comes in.\n",
"##finally\n",
"The finally: block of code will always be run regardless if there was an exception in the try code block. The syntax is:\n",
"\n",
Expand Down Expand Up @@ -404,7 +404,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Great! Now you know how to handle erros and exceptions in Python with the try, except, else, and finally notation!**"
"**Great! Now you know how to handle errors and exceptions in Python with the try, except, else, and finally notation!**"
]
}
],
Expand Down
8 changes: 4 additions & 4 deletions Errors and Exceptions Homework - Solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"An error ocurred!\n"
"An error occurred!\n"
]
}
],
Expand All @@ -35,7 +35,7 @@
" for i in ['a','b','c']:\n",
" print i**2\n",
"except:\n",
" print \"An error ocurred!\""
" print \"An error occurred!\""
]
},
{
Expand Down Expand Up @@ -95,7 +95,7 @@
" try:\n",
" n = input('Input an integer: ')\n",
" except:\n",
" print 'An error occured! Please try again!'\n",
" print 'An error occurred! Please try again!'\n",
" continue\n",
" else:\n",
" break\n",
Expand All @@ -116,7 +116,7 @@
"output_type": "stream",
"text": [
"Input an integer: null\n",
"An error occured! Please try again!\n",
"An error occurred! Please try again!\n",
"Input an integer: 2\n",
"Thank you, you number squared is: 4\n"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"output_type": "stream",
"text": [
"Input an integer: null\n",
"An error occured! Please try again!\n",
"An error occurred! Please try again!\n",
"Input an integer: 2\n",
"Thank you, you number squared is: 4\n"
]
Expand Down
2 changes: 1 addition & 1 deletion Files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to not have to reset every time, we can also use the readlines method. Use this with caution ofr large files, since everything will be held in memory. We will learn how to iterate over large files later in the course."
"In order to not have to reset every time, we can also use the readlines method. Use caution with large files, since everything will be held in memory. We will learn how to iterate over large files later in the course."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Filter .ipynb → Filter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Great! You hsould now have a solid understanding of filter() and how to apply it to your code!"
"Great! You should now have a solid understanding of filter() and how to apply it to your code!"
]
}
],
Expand Down
16 changes: 8 additions & 8 deletions For Loops .ipynb → For Loops.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"#for Loops\n",
"\n",
"A **for** loop acts as an iterator in Python, it goes through items that are in a *sequence* or any other iterable item. Objects that we've learned about that we can ietrate over include strings,lists,tuples, and even built in iterables for dictionaries, such as the keys or values.\n",
"A **for** loop acts as an iterator in Python, it goes through items that are in a *sequence* or any other iterable item. Objects that we've learned about that we can iterate over include strings,lists,tuples, and even built in iterables for dictionaries, such as the keys or values.\n",
"\n",
"We've already seen the **for** statement a little bit in past lectures but now lets formalize our understanding.\n",
"\n",
Expand All @@ -21,9 +21,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The variable name used for the item is completely up to the coder, so use your best judgement for choosing a name that makes sense and you will be able to understand when revisiting your code. This item name can then be referenced inside you loop, for example if you wanted to use if statements to perform checks.\n",
"The variable name used for the item is completely up to the coder, so use your best judgment for choosing a name that makes sense and you will be able to understand when revisiting your code. This item name can then be referenced inside you loop, for example if you wanted to use if statements to perform checks.\n",
"\n",
"Let's go ahead and work through several example of **for** loops using a varieyt of data object types. we'll start simple and build more complexity later on.\n",
"Let's go ahead and work through several example of **for** loops using a variety of data object types. we'll start simple and build more complexity later on.\n",
"\n",
"##Example 1\n",
"Iterating through a list."
Expand Down Expand Up @@ -181,7 +181,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice that if a number is fuly divisble with no remainder, the result of the modulo call is 0. We can use this to test for even numbers, since if a number modulo 2 is equal to 0, that means it is an even number!\n",
"Notice that if a number is fully divisible with no remainder, the result of the modulo call is 0. We can use this to test for even numbers, since if a number modulo 2 is equal to 0, that means it is an even number!\n",
"\n",
"Back to the **for** loops!\n",
"\n",
Expand Down Expand Up @@ -258,7 +258,7 @@
"metadata": {},
"source": [
"## Example 3\n",
"Another common idea during a **for** loop is keeping some sort of running tally during the multiple loops. For exampl, lets create a for loop that sums up the list:"
"Another common idea during a **for** loop is keeping some sort of running tally during the multiple loops. For example, lets create a for loop that sums up the list:"
]
},
{
Expand Down Expand Up @@ -401,7 +401,7 @@
"metadata": {},
"source": [
"## Example 6\n",
"Tuples have a special quality when it comes to **for** loops. If you are iterating through a seqeunce that contains tuples, the item can actually be the tuple itself, this is an example of *tuple unpacking*. During the **for** loop we will be unpacking the tuple inside of a sequence and we can access the individual items inside that tuple!"
"Tuples have a special quality when it comes to **for** loops. If you are iterating through a sequence that contains tuples, the item can actually be the tuple itself, this is an example of *tuple unpacking*. During the **for** loop we will be unpacking the tuple inside of a sequence and we can access the individual items inside that tuple!"
]
},
{
Expand Down Expand Up @@ -464,7 +464,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Cool! With tuples in a sequence we can access the items inside of them through unpacking! The reason this is important is beacause many object will deliver their iterables through tuples. Let's start exploring iterating through Dictionaries to explore this further!"
"Cool! With tuples in a sequence we can access the items inside of them through unpacking! The reason this is important is because many object will deliver their iterables through tuples. Let's start exploring iterating through Dictionaries to explore this further!"
]
},
{
Expand Down Expand Up @@ -617,7 +617,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You might be wondering why this worked in Python 2. This is because of the introduction of generators to Python during its earlier years. (We will go over generators and what they are in a future section, but the basic notion is that generators don't store data in memory, but instead just yeild it to you as it goes through an iterable item).\n",
"You might be wondering why this worked in Python 2. This is because of the introduction of generators to Python during its earlier years. (We will go over generators and what they are in a future section, but the basic notion is that generators don't store data in memory, but instead just yield it to you as it goes through an iterable item).\n",
"\n",
"Originally, Python items() built a real list of tuples and returned that. That could potentially take a lot of extra memory.\n",
"\n",
Expand Down
Loading

0 comments on commit 6eef194

Please sign in to comment.