diff --git a/Decorators Homework.ipynb b/Decorators Homework.ipynb index 7d62015..6d87dc6 100644 --- a/Decorators Homework.ipynb +++ b/Decorators Homework.ipynb @@ -6,7 +6,7 @@ "source": [ "#Decorators Homework (Optional)\n", "\n", - "Since you won't run into decorators until further in your coding career, this homework is optional. Check out the Web Framework [Flask](http://flask.pocoo.org/). You can use Flask to create web pages with Python (as long as you know some HTML and CSS) and they use decorators a lot! Learn how they use [view decorators](http://flask.pocoo.org/docs/0.10/patterns/viewdecorators/). Don't worry if you don't completely understand everything about Flask, the main point of this optional homework is that you have an awareness of decorators in Web Frameworks, that way if you decide to become a \"Full-Stack\" Python Web Developer, you won't find yourself perplexed by decorators. You can also check out [Django](https://www.djangoproject.com/) another (and more popular) web framework for Python which is a bit more heavy duty.\n", + "Since you won't run into decorators until further in your coding career, this homework is optional. Check out the Web Framework [Flask](http://flask.pocoo.org/). You can use Flask to create web pages with Python (as long as you know some HTML and CSS) and they use decorators a lot! Learn how they use [view decorators](http://flask.pocoo.org/docs/0.12/patterns/viewdecorators/). Don't worry if you don't completely understand everything about Flask, the main point of this optional homework is that you have an awareness of decorators in Web Frameworks, that way if you decide to become a \"Full-Stack\" Python Web Developer, you won't find yourself perplexed by decorators. You can also check out [Django](https://www.djangoproject.com/) another (and more popular) web framework for Python which is a bit more heavy duty.\n", "\n", "Also for some additional info:\n", "\n", diff --git a/Dictionaries.ipynb b/Dictionaries.ipynb index 9abf3c8..201010b 100644 --- a/Dictionaries.ipynb +++ b/Dictionaries.ipynb @@ -313,7 +313,7 @@ "source": [ "## Nesting with Dictionaries\n", "\n", - "Hopefully your starting to see how powerful Python is with its flexibility of nesting objects and calling methods on them. Let's see a dictionary nested inside a dictionary:" + "Hopefully you're starting to see how powerful Python is with its flexibility of nesting objects and calling methods on them. Let's see a dictionary nested inside a dictionary:" ] }, { @@ -332,7 +332,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Wow! Thats a quite the inception of dictionaries! Let's see how we can grab that value:" + "Wow! That's a quite the inception of dictionaries! Let's see how we can grab that value:" ] }, { diff --git a/GUI/3 - Widget Events.ipynb b/GUI/3 - Widget Events.ipynb index fb69fff..a33d31a 100644 --- a/GUI/3 - Widget Events.ipynb +++ b/GUI/3 - Widget Events.ipynb @@ -304,7 +304,7 @@ "outputs": [], "source": [ "# Create Caption\n", - "caption = widgets.Latex(value = 'The values of slider1 and slider2 are synchronized')\n", + "caption = widgets.Label(value = 'The values of slider1 and slider2 are synchronized')\n", "\n", "# Create IntSlider\n", "slider1 = widgets.IntSlider(description='Slider 1')\n", @@ -326,7 +326,7 @@ "outputs": [], "source": [ "# Create Caption\n", - "caption = widgets.Latex(value = 'Changes in source values are reflected in target1')\n", + "caption = widgets.Label(value = 'Changes in source values are reflected in target1')\n", "\n", "# Create Sliders\n", "source = widgets.IntSlider(description='Source')\n", @@ -380,7 +380,7 @@ "outputs": [], "source": [ "# NO LAG VERSION\n", - "caption = widgets.Latex(value = 'The values of range1 and range2 are synchronized')\n", + "caption = widgets.Label(value = 'The values of range1 and range2 are synchronized')\n", "\n", "range1 = widgets.IntSlider(description='Range 1')\n", "range2 = widgets.IntSlider(description='Range 2')\n", @@ -398,7 +398,7 @@ "outputs": [], "source": [ "# NO LAG VERSION\n", - "caption = widgets.Latex(value = 'Changes in source_range values are reflected in target_range1')\n", + "caption = widgets.Label(value = 'Changes in source_range values are reflected in target_range1')\n", "\n", "source_range = widgets.IntSlider(description='Source range')\n", "target_range1 = widgets.IntSlider(description='Target range ')\n", diff --git a/Iterators and Generators.ipynb b/Iterators and Generators.ipynb index e97fbd9..ee23bd2 100644 --- a/Iterators and Generators.ipynb +++ b/Iterators and Generators.ipynb @@ -15,7 +15,7 @@ "\n", "We've touch on this topic in the past when discussing the range() function in Python 2 and the similar xrange(), with the difference being the xrange() was a generator.\n", "\n", - "Lets explore a little deep. We've learned how to create functions with **def** and the **return** statement. Generator functions allow us to write a function that can send back a value and then later resume to pick up where it left off. This type of function is a generator in Python, allowing us to generate a sequence of values over time. The main difference in syntax will be the use of a **yield** statement.\n", + "Lets explore a little deeper. We've learned how to create functions with **def** and the **return** statement. Generator functions allow us to write a function that can send back a value and then later resume to pick up where it left off. This type of function is a generator in Python, allowing us to generate a sequence of values over time. The main difference in syntax will be the use of a **yield** statement.\n", "\n", "In most aspects, a generator function will appear very similar to a normal function. The main difference is when a generator function is compiled they become an object that support an iteration protocol. That means when they are called in your code the don't actually return a value and then exit, the generator functions will automatically suspend and resume their execution and state around the last point of value generation. The main advantage here is that instead of having to compute an entire series of values upfront and the generator functions can be suspended, this feature is known as *state suspension*.\n", "\n", diff --git a/Jupyter (iPython) Notebooks Guide.ipynb b/Jupyter (iPython) Notebooks Guide.ipynb index a8c9178..d61b6c8 100644 --- a/Jupyter (iPython) Notebooks Guide.ipynb +++ b/Jupyter (iPython) Notebooks Guide.ipynb @@ -7,7 +7,7 @@ "# Guide to Using Jupyter Notebooks\n", "In this lecture we will be going over the basics of the Jupyter (previously called iPython Notebooks).\n", "\n", - "For a complete User Manual check out the [Bryn Mawr College Computer Science Guide](http://jupyter.cs.brynmawr.edu/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb).\n", + "For a complete User Manual check out the [Bryn Mawr College Computer Science Guide](https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb).\n", "\n", "Most of the breakdown will actually occur in the presentation corresponding to this Notebook. So please refer to either the presentation or the full User Manual linked above." ] diff --git a/Milestone Project 1 - Advanced Solution.ipynb b/Milestone Project 1 - Advanced Solution.ipynb index cb7e483..ed4e7d3 100644 --- a/Milestone Project 1 - Advanced Solution.ipynb +++ b/Milestone Project 1 - Advanced Solution.ipynb @@ -163,6 +163,10 @@ " print(\"Sorry, please input a number between 1-9.\")\n", " continue\n", "\n", + " if choice not in range(1,10):\n", + " print(\"Sorry, please input a number between 1-9.\")\n", + " continue\n", + "\n", " if board[choice] == \" \":\n", " board[choice] = mark\n", " break\n",