diff --git a/00. Introduction.ipynb b/00. Introduction.ipynb index 4652f26..e753c42 100644 --- a/00. Introduction.ipynb +++ b/00. Introduction.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "Welcome to this introductory course on Python! This course is intended to help you start programming in Python from little or no prior experience. There are video tutorials for each exercise if you have questions along the way.\n", "\n", - "[![Intro to Python](http://img.youtube.com/vi/EO_YpBs8cs0/0.jpg)](https://www.youtube.com/watch?v=EO_YpBs8cs0&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Introduction to Python\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=EO_YpBs8cs0&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Intro to Python](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython00.png)](https://www.youtube.com/watch?v=EO_YpBs8cs0&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Introduction to Python\")\n", "\n", "One of the unique things about this course is that you work on basic elements to help you with a temperature control project. You will see your Python code have a real effect by adjusting heaters to maintain a target temperature, just like a thermostat in a home or office.\n", "\n", @@ -21,7 +22,7 @@ "\n", "![buildings](https://apmonitor.com/che263/uploads/Begin_Python/buildings.png)\n", "\n", - "This project is to regulate the temperature of the TCLab. Each TCLab has thermochromic (changes color with temperature) paint that turns from black to purple when the temperature reaches the target temperature of 37°C (99°F).\n", + "This project is to regulate the temperature of the TCLab (Temperature Control Lab). Each TCLab has thermochromic (changes color with temperature) paint that turns from black to purple when the temperature reaches the target temperature of 37°C (99°F).\n", "\n", "![pid control](https://apmonitor.com/pdc/uploads/Main/pid_control.gif)\n", "\n", @@ -29,7 +30,7 @@ "\n", "[![Install Anaconda](http://img.youtube.com/vi/LrMOrMb8-3s/0.jpg)](https://www.youtube.com/watch?v=LrMOrMb8-3s \"Install Anaconda\")\n", "\n", - "The video is about how to install Anaconda and a few things you can do with Anaconda. Examples are with Jupyter and Spyder. There are [additional instructions on installing Python and managing modules](https://apmonitor.com/pdc/index.php/Main/InstallPython)." + "The video shows how to install Anaconda and a few things you can do with the Jupyter Notebook. Examples are with Jupyter Notebook and Spyder. There are [additional instructions on installing Python and managing modules](https://apmonitor.com/pdc/index.php/Main/InstallPython)." ] } ], @@ -49,7 +50,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/01. Overview.ipynb b/01. Overview.ipynb index d4d205b..640400e 100644 --- a/01. Overview.ipynb +++ b/01. Overview.ipynb @@ -12,7 +12,9 @@ "\n", "You have eggs that need to hatch in an incubator. One option is to constantly check the temperature and adjust the heaters manually. Another way is to automate the temperature control by constantly checking the temperature and adjusting the heaters with Python. Unfortunately, you only get three eggs for the test and one attempt to get it right. You do have a simulator of the incubator (TCLab) so you can practice Python, without having to worry about mistakes. The purpose of this lab is to develop a temperature controller (like a thermostat) that could be used for an egg incubator. There are other factors such as humidity and turning the eggs that are important with incubators but we'll only focus on the temperature for this project.\n", "\n", - "[![Course Overview](http://img.youtube.com/vi/wuWLVbBFPuc/0.jpg)](https://www.youtube.com/watch?v=wuWLVbBFPuc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Course Overview\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=wuWLVbBFPuc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Course Overview](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython01.png)](https://www.youtube.com/watch?v=wuWLVbBFPuc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Course Overview\")\n", "\n", "### Introduction\n", "\n", diff --git a/02. Debugging.ipynb b/02. Debugging.ipynb index fcb502c..324ffb8 100644 --- a/02. Debugging.ipynb +++ b/02. Debugging.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,21 +8,23 @@ "\n", "![debug](https://apmonitor.com/che263/uploads/Begin_Python/debug.png)\n", "\n", - "One of the biggest time consuming parts of programming is debugging, or resolving mistakes in the program. This is true for every language because the computer needs exact commands, which is very important for precise measurements and control for incubating. A few steps can limit the time you are searching for mistakes, instead of completing the project. \n", + "One of the biggest time consuming parts of programming is debugging, or resolving mistakes in the program. This is true for every language because the computer needs exact commands, which is very important for precise measurements and temperature control. A few steps can limit the time you are searching for mistakes, instead of completing the project. \n", "\n", - "[![Pseudo-Code and Debugging](http://img.youtube.com/vi/n1BlQkoWbdM/0.jpg)](https://www.youtube.com/watch?v=n1BlQkoWbdM&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Pseudo-Code and Debugging\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=n1BlQkoWbdM&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Pseudo-Code and Debugging](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython02.png)](https://www.youtube.com/watch?v=n1BlQkoWbdM&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Pseudo-Code and Debugging\")\n", "\n", "### Steps for more effective programming\n", "\n", "![list](https://apmonitor.com/che263/uploads/Begin_Python/list.png)\n", "\n", - "1. Start with understanding the big picture. It seems silly, but once you start going over the whole thing you find a lot of gaps. Do this in whichever way suits you best, we’ll leave it up to you. For the egg incubator, it would be understanding what you actually need to do to help an egg hatch.\n", + "1. Start with understanding the big picture. Go over the whole program architecture to find high-level gaps. Do this in whichever way suits you best, such as drawing a flowchart. For the egg incubator, the program scope is to diagram what you actually need to do to help an egg hatch.\n", "\n", "2. Start by outlining your code, writing **high-level instructions (pseudo-code)** what you want each section of the code to do. Break it into more specific tasks. You can do this even without understanding the basics of Python. Once you learn Python basics, you can translate these high level instructions into code. Organizing the outline helps to make sure your programming isn't more complex than it needs to be.\n", "\n", - "3. Program the specific tasks and connect them together. Direct tasks make it significantly easier to program because the program is modular. It’s a lot harder to program something if the program is large and complex. For the incubator, this may be programming something specific like how hard the heater should work, based on a low temperature reading.\n", + "3. Program the specific tasks and connect them together. Direct tasks make it significantly easier to program because the program is modular. It is a lot harder to program something if the program is large and complex. For the incubator, this may be programming something specific like how hard the heater should work, based on a low temperature reading.\n", "\n", - "4. Test and fix problems. This is basically debugging, but don’t only test the whole project all in one go. It’s much easier to find a problem if you test every once in a while, when you are programming smaller parts. A good way to do this is grab a specific piece of code, run it on a seperate file, and see if it does the job you want. An example would be fixing when the heater should stop working, so the egg doesn't go over temperature.\n", + "4. Test and fix problems. This is debugging, but don’t only test the whole project after you've completed all of the programming. It is much easier to find a problem if you test every once in a while, when you are programming smaller parts. A good way to do this is grab a specific piece of code, run it on a separate file, and see if it does the job you want. An example would be fixing when the heater should stop working, so the egg doesn't go over temperature.\n", "\n", "The better you follow these steps the less time you will have to spend fixing problems in your code for your incubator, or just Python programs in general.\n", "\n", @@ -81,7 +82,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/03. Variables.ipynb b/03. Variables.ipynb index 1f5dffa..3102d96 100644 --- a/03. Variables.ipynb +++ b/03. Variables.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,9 +8,11 @@ "\n", "![chickens](https://apmonitor.com/che263/uploads/Begin_Python/chickens.png)\n", "\n", - "Variables store information and are objects in Python. For example, if you wanted to keep a set temperature for an egg, you would type ```egg = 37.5``` for °C or ```egg = 99.5``` for °F. The first part tells what the variable will be called, and the value after the ```=``` tells what is being stored. \n", + "Variables store information and are objects in Python. For example, if you wanted to keep a set temperature for an egg, you would type ```egg = 37.5``` (°C) or ```egg = 99.5``` (°F). The first part tells what the variable will be called, and the value after the ```=``` tells what is being stored. \n", "\n", - "[![Variable Types](http://img.youtube.com/vi/q6QOsauDyPg/0.jpg)](https://www.youtube.com/watch?v=q6QOsauDyPg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Variable Types\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=q6QOsauDyPg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Variable Types](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython03.png)](https://www.youtube.com/watch?v=q6QOsauDyPg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Variable Types\")\n", "\n", "### Types of Variables\n", "\n", @@ -19,7 +20,7 @@ "\n", "There are many types of value types but for now, we’ll just go through the basics. You can run the code, but in this case the computer won't tell you anything, because it is only storing values. \n", "\n", - "While you can run a program by clicking the run button towards the top of the screen, a better way to run cells individually is to click a cell, then hold ```Ctrl``` and press ```Enter```. Running this way means you're running one cell at a time, instead of all at once. Some Jupyter Notebooks also have the run button to the left of the program cell." + "While you can run a program by clicking the run button towards the top of the screen, a better way to run cells individually is to click a cell, then type ```Ctrl``` and ```Enter```. Running this way means you're running one cell at a time, instead of all cell. Jupyter Notebooks can also have the run button to the left of the program cell." ] }, { @@ -44,7 +45,7 @@ "metadata": {}, "source": [ "#### Floats\n", - "Floating point numbers, or ```float```, are basically the same thing, but with decimals like ```4.72```." + "Floating point numbers, or ```float```, are also numbers, but with decimals like ```4.72```." ] }, { @@ -61,7 +62,7 @@ "metadata": {}, "source": [ "#### Strings\n", - "Strings, or ```str```, are words or text, usually typed like ```\"hi\"```. You can use ```\"\"``` or ```''```." + "Strings, or ```str```, are words or text, usually typed like ```\"hi\"```. You can use double ```\"\"``` or single ```''``` quotes." ] }, { @@ -78,7 +79,7 @@ "metadata": {}, "source": [ "#### Boolean\n", - "Boolean, or ```bool```, is a ```True``` or ```False``` Statement." + "Boolean, or ```bool```, is a ```True``` or ```False``` value. They both need to start with a capital letter." ] }, { @@ -95,7 +96,7 @@ "metadata": {}, "source": [ "### Comments \n", - "Comments are just words in a program to explain what is happening. They don't do anything to the program. They are created with the ```#``` symbol." + "Comments are ignored by Python and are words in a program to explain the code. They are created with the ```#``` symbol and can appear to the right of a statement or on a separate line." ] }, { @@ -108,7 +109,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -130,7 +130,7 @@ "```python\n", "_this_is_a_variable_27 = \"Incubator Temperature Control\"```\n", "\n", - "If you want to check your understanding, run incorrect variables and then fix the variable names to whatever you want. Make sure the it follows naming rules." + "If you want to check your understanding, run incorrect variables and then fix the variable names to whatever you want. Make sure the variable name follows the naming rules." ] }, { @@ -183,7 +183,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -246,7 +245,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/04. Printing.ipynb b/04. Printing.ipynb index af82004..d59cc34 100644 --- a/04. Printing.ipynb +++ b/04. Printing.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,9 +8,11 @@ "\n", "![exercise](https://apmonitor.com/che263/uploads/Begin_Python/exercise.png)\n", "\n", - "Printing is displaying values to the screen. The word `print` comes from the time when programs previously put ink on paper. You use the built in python __function__ ```print()``` to output values.\n", + "Printing is displaying values to the screen. The word `print` comes from the time when programs previously put ink on paper. You use the built-in python __function__ ```print()``` to output values.\n", "\n", - "[![Print](http://img.youtube.com/vi/CCPNIocw0_Y/0.jpg)](https://www.youtube.com/watch?v=CCPNIocw0_Y&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Print\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=CCPNIocw0_Y&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Print](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython04.png)](https://www.youtube.com/watch?v=CCPNIocw0_Y&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Print\")\n", "\n", "You could use this to tell you what the current temperature of the egg is and when to display it. Get more practice by putting something different in the function and running the program." ] @@ -29,7 +30,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can also print functions, this function is one that will tell the information type that is stored in a variable. So it will print out `````` or str, bool, float, whatever the information in the variable is." + "You can also print functions, this function is one that will tell the information type that is stored in a variable. The `type` function will return ``````, `str`, `bool`, `float`, whatever is stored in the variable." ] }, { @@ -101,7 +102,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -142,7 +142,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -223,7 +222,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/05. Classes and Objects.ipynb b/05. Classes and Objects.ipynb index 8294011..3cb0de7 100644 --- a/05. Classes and Objects.ipynb +++ b/05. Classes and Objects.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,13 +10,14 @@ "\n", "Classes are collections of objects and functions. Many Python packages such as `time`, `tclab`, `numpy`, `scipy`, `gekko`, and others are distributed as `classes`. A class is imported with the `import` statement such as ```import time```.\n", "\n", - "[![Classes and Objects](http://img.youtube.com/vi/-rvIRWf7eGc/0.jpg)](https://www.youtube.com/watch?v=-rvIRWf7eGc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Classes and Objects\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=-rvIRWf7eGc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Classes and Objects](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython05.png)](https://www.youtube.com/watch?v=-rvIRWf7eGc&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Classes and Objects\")\n", "\n", "Time is a package that has timing functions that we will use to pause the program for a specified amount of time. TCLab package has functions created with ```tclab.TCLab()```. The next lesson shows how to use the `tclab` functions." ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -25,7 +25,7 @@ "\n", "![parent_child](https://apmonitor.com/che263/uploads/Begin_Python/parent_child.png)\n", "\n", - "Variables such as `int`, `float`, and `str` types are objects. Objects may also be created from a class template to create a new custom variable. You use a variable assignment to create an object, assigned to a name, such as ```lab = tclab.TCLab()```. This is called a parent (`tclab.TCLab()`) to child (`lab`) relationship because `lab` is created from the class `tclab`. The child object `lab` inherents all the functions of the parent. The child object is modified and customized in your code. You can give objects a name that you will remember and that are easy to type. For `tclab`, we prefer to use ```lab```, but it can be a different name. " + "Variables such as `int`, `float`, and `str` types are objects. Objects may also be created from a class template to create a new custom variable. You use a variable assignment to create an object, assigned to a name, such as ```lab = tclab.TCLab()```. This is called a parent (`tclab.TCLab()`) to child (`lab`) relationship because `lab` is created from the class `tclab`. The child object `lab` inherits all the functions of the parent. The child object is modified and customized in your code. You can give objects a name that you will remember and that are easy to type. For `tclab`, we prefer to use ```lab```, but it can be a different name. " ] }, { @@ -49,7 +49,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -107,7 +106,7 @@ "\n", "This object is what allows you to connect with the kit, read current temperatures, adjust heaters, or change the LED brightness. In the next lesson we will go over the basics of what this temperature control kit can really do. \n", "\n", - "Plug in your TCLab if it's available. Now try running and the program will create the object from below. Now if tclab package is installed and imported, it should connect, tell you additional information about your TCLab, then disconnect. If it doesn't work, or comes up with an error, go to the file __TCLab Help__.\n", + "Plug in your TCLab if it's available. Now try running and the program will create the object from below. If the `tclab` package is installed and imported, it should connect, tell you additional information about your TCLab, then disconnect. If it doesn't work, or comes up with an error, go to the file __TCLab Help__.\n", "\n", "Don't worry if this is confusing, most of it will be explained in the next lesson." ] @@ -124,7 +123,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -188,7 +186,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/06. Functions.ipynb b/06. Functions.ipynb index d630bf4..c126c93 100644 --- a/06. Functions.ipynb +++ b/06. Functions.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "Functions create modular code that can do the same task repeatedly without you having to type out the same code each time. Functions make complex code accessible with a single statement. You also can create your own function, but there are also some are built in to Python or in many packages. One built in function you have already seen is the ```print()``` function.\n", "\n", - "[![Functions](http://img.youtube.com/vi/dP3e2jIHqXw/0.jpg)](https://www.youtube.com/watch?v=dP3e2jIHqXw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Functions\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=dP3e2jIHqXw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Functions](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython06.png)](https://www.youtube.com/watch?v=dP3e2jIHqXw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Functions\")\n", "\n", "For the incubation example, a display function could be used such as the function `ctemp()` to print the current temperature. This re-uses the print statement so that you don't need to type it out each time for temperatures 1 and 2.\n", "\n", @@ -35,7 +36,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -54,9 +54,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The code is then put into the function on what it's supposed to do. \n", - "\n", - "But now you need to call the function for it to actually use that code. The way you do that is the function name with ```()```." + "The code is then added into the function scope. Once the function code is complete, you need to call the function for it to run that code. The way you do that is the function name with ```()``` as `myFunction()`." ] }, { @@ -75,9 +73,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can also put in values in the ```()``` to the function that it needs to run. Sometimes a function you've made needs two numbers for example, to do an equation. You should also use the ```return``` phrase that gives back the called statement, ```myFunction()```, a value to output.\n", + "You can also put in values in the ```()``` as inputs for the function. Sometimes a function needs multiple inputs and those can be separated with commas. You should also use the ```return``` statement that gives back results from `myFunction()`.\n", "\n", - "This is a confusing concept, and if you need more help with it, play around with the code below or research functions online." + "This is a confusing concept, and if you need more help with it, play around with the code below or research information about Python functions online." ] }, { @@ -93,7 +91,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -117,7 +114,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -125,27 +121,26 @@ "\n", "![connections](https://apmonitor.com/che263/uploads/Begin_Python/connections.png)\n", "\n", - "In the last lesson on objects, it mentioned the ```lab``` object. Objects can have functions that are used with a ```.``` and then the function name. Using functions, we can change things on our temperature kit values such as __light brightness__, __heater power__, and get __output temperatures__.\n", + "In the last lesson on objects, it mentioned the ```lab``` object. Objects can have functions that are used with a ```.``` and then the function name. Functions can change things on the TCLab such as __light brightness__, __heater power__, and get __temperatures__.\n", "\n", "***LED***\n", "\n", - "```lab.LED()``` This function will set the light, that is labeled __Hot__, on your tclab turn on at a certain brightness. If you want the light brightest you would use ```lab.LED(100)``` and all the way off ```lab.LED(0)```.\n", + "```lab.LED()``` This function sets the LED power, that is labeled __Hot__, on your tclab turn on at a certain brightness. If you want the light brightest use ```lab.LED(100)``` and ```lab.LED(0)``` to turn the LED off.\n", "\n", "***Heaters***\n", "\n", - "```lab.Q1()``` or ```lab.Q2()``` will set the power percentage of heater one or two. Same as the ```LED``` function, ```Q1``` is set highest at ```lab.Q1(100)``` and off at ```lab.Q1(0)```. The other heater works the same way, ```Q2``` is set highest at ```lab.Q2(100)``` and off at ```lab.Q2(0)```\n", + "```lab.Q1()``` or ```lab.Q2()``` sets the power percentage of heater one or two. Same as the ```LED``` function, ```Q1``` is set highest at ```lab.Q1(100)``` and off at ```lab.Q1(0)```. The other heater works the same way, ```Q2``` is set highest at ```lab.Q2(100)``` and off at ```lab.Q2(0)```\n", "\n", "***Temperatures***\n", "\n", - "```lab.T1``` or ```lab.T2``` gives the current reading of the heater it corresponds to. It will give the values in __Celsius__.\n", + "```lab.T1``` or ```lab.T2``` gives the current reading of the temperature for the first or second heater. It gives the values in __Celsius__.\n", "\n", "***Disconnecting***\n", "\n", - "We also use ```lab.close()``` at the end of the program to disconnect the kit to make sure it doesn't keep running the heaters. You don't want your heaters to keep going when you don't want them to. This function does _not_ turn off the LED, however." + "We also use ```lab.close()``` at the end of the program to disconnect the kit to make sure it doesn't keep the heaters on. This function does _not_ turn off the LED, however." ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -178,7 +173,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Use heater one, ```lab.Q1```, at 40 percent and heater two, ```lab.Q2```, at 80 percent. Use ```print()``` to record the temperatures with ```lab.T1``` and ```lab.T2``` after 10 seconds, with ```time.sleep()```. Make sure to disconnect the heaters after you record the temperatures. Use the LED activity and the discriptions above if you don't remember some of the functions. If the heaters don't turn off because of a bug in your code, unplug the cables connected to the lab to stop heat up or restart the kernel to run the lab again. If you get errors when you run your code, check out the __TCLab Help__ IPython notebook for common errors or search the [Frequently Asked Questions for Troubleshooting](https://apmonitor.com/pdc/index.php/Main/ArduinoSetup). You can also read the error descriptions Jupyter gives you below your code to diagnose the problem." + "Use heater one, ```lab.Q1```, at 40 percent and heater two, ```lab.Q2```, at 80 percent. Use ```print()``` to record the temperatures with ```lab.T1``` and ```lab.T2``` after 10 seconds, with ```time.sleep()```. Make sure to disconnect the heaters after you record the temperatures. Use the LED activity and the discriptions above if you don't remember some of the functions. If the heaters don't turn off because of a bug in your code, unplug the cables connected to the lab to stop the heaters or restart the kernel to run the lab again. If you get errors when you run your code, check out the __TCLab Help__ IPython notebook for common errors or search the [Frequently Asked Questions for Troubleshooting](https://apmonitor.com/pdc/index.php/Main/ArduinoSetup). You can also read the error descriptions Jupyter gives you below your code to diagnose the problem." ] }, { @@ -205,7 +200,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/07. Loops.ipynb b/07. Loops.ipynb index 719cc89..a2c4edd 100644 --- a/07. Loops.ipynb +++ b/07. Loops.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "There are two basic types of loops including `for` and `while`. An example of a loop is to check the temperature of the egg every second and adjust the heater.\n", "\n", - "[![Loops](http://img.youtube.com/vi/qR0njzQvvOA/0.jpg)](https://www.youtube.com/watch?v=qR0njzQvvOA&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Loops\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=qR0njzQvvOA&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Loops](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython07.png)](https://www.youtube.com/watch?v=qR0njzQvvOA&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Loops\")\n", "\n", "### While Loops\n", "\n", @@ -19,7 +20,7 @@ "\n", "While loops work by repeating until the condition becomes ```False```. The way they are coded can almost be said as a sentence. ```while x > 0:``` While x is greater than 0.\n", "\n", - "These get stuck in an infinite loop if the condition for termination is never met. You can stop the infinite loop by setting the value of ```True``` to become ```False``` in many ways. In the code below, the infinite loop is broken by making ```x``` one less each time it goes through the loop, with ```x = x - 1```. \n", + "While loops can get stuck in an infinite loop if the condition for termination is never met. You can stop the infinite loop by setting the value of ```True``` to become ```False``` in different ways. In the code below, the infinite loop is broken by making ```x``` one less each time it goes through the loop, with ```x = x - 1```. \n", "\n", "See how the loop changes by switching the value of ```x```." ] @@ -45,7 +46,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Pro Tip: ```x = x - 1``` can be simplified into ```x -= 1```. They mean the same thing, it's just a little shorter. This is true for most other math operators. ```+=```, ```*=```, ```/=```, are all working equations." + "Tip: ```x = x - 1``` can be simplified into ```x -= 1```. They mean the same thing, it's just a little shorter. This is true for most other math operators. ```+=```, ```*=```, ```/=```, are all working equations." ] }, { @@ -63,7 +64,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Another thing used in while loops is the ```==``` symbols. Just one ```=``` means you are assigning a variable, but you can't do that in a ```while``` loop because you can't assign variables wherever. Instead use the ```==``` to tell the code you are just comparing the two values. For example:\n", + "Another thing used in `while` loops is comparitive statements such as ```==``` symbols. Just one ```=``` means you are assigning a variable, but this shouldn't be done to check ```while``` loop conditions. Instead use the ```==``` to tell the `while` loop that you are just comparing the two values. For example:\n", + "\n", "```python\n", "while x == 0:\n", "```" @@ -92,7 +94,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -100,11 +101,9 @@ "\n", "![exercise](https://apmonitor.com/che263/uploads/Begin_Python/exercise.png)\n", "\n", - "For loops can be very useful but are a little more complicated to understand. They are formatted ```for i in ```\\___```:```. The ```i``` is just a typical iterator. You can enter any variable name you like right there. \n", - "\n", - "You typically use a ```for``` loop when you know the number of times the loop should repeat. A ```while``` loop is when you don't know the number of times to cycle through the instructions whe you start. The ```i```, is used to keep track of the current loop count. The ```in``` is saying what values the `for` loop iterates through, and the ```blank``` is what value the `for` loop will use.\n", + "A `for` loop is needed when you know how many times the loop should cycle. A `while` loop is typically used when the number of cycles is unknown beforehand. A `for` loop is formatted ```for i in ```[1,2,3]```:```. The ```i``` is just a typical iterator. You can enter any variable name you like instead of `i`. The ```i```, is used to keep track of the current loop count. The ```in``` is saying what values the `for` loop iterates through, and the ```[1,2,3]``` is a list of the values that the `for` loop will use.\n", "\n", - "You can enter a number of things into the blank spot to complete the loop, and we'll go over those below. You can practice `for` loops by putting new values into that spot such as a list or range operator." + "You can enter a number of things besides the `[1,2,3]` to define the loop, and we'll go over those below. You can practice `for` loops by putting new values into that spot such as a list or range operator." ] }, { @@ -196,13 +195,13 @@ "metadata": {}, "source": [ "#### Using ```i```\n", - "Now here's the twist. In a `for` loop the ```i``` variable, in ```for i in ```(variable, range, string)```:```, can be used during the repeating loop. Everytime the for loop goes again, it goes to the next value, and puts it into i. You can use `i` in a loop to do different things based on the cycle number. \n", + "Now here's the twist. In a `for` loop the ```i``` variable, in ```for i in ```(variable, range, string)```:```, can be used during the repeating loop. Everytime the `for` loop repeats again, it goes to the next value, and assigns it to `i`. You can use `i` in a loop to do different things based on the cycle number. \n", "\n", "This is similar to the ```while``` loop example where we used this code \n", "```python\n", "print(\"Almost done \" + str(x))```\n", "\n", - "For numbers, ```for loops``` start counting at 0. So if the loop had a ```range(3)```, it would count 0, 1, 2. For strings, it just prints the individual characters in order so ```\"hi\"``` would just output __h__ then __i__. This can be used in a number of useful ways you may use later in this course. Now using stepping in range, we can print numbers in steps." + "For numbers, ```for loops``` start counting at `0`. If the loop had a ```range(3)```, it would count 0, 1, 2. For strings, it just prints the individual characters in order so ```\"hi\"``` would just output __h__ then __i__. This can be used in a number of useful ways you may use later in this course. Now using stepping in range, we can print numbers in steps." ] }, { @@ -229,7 +228,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -270,7 +268,7 @@ "source": [ "When you run code that turns on the heaters, make sure they work by putting your hand over them or observing the thermochromic paint turn pink when they are over 37°C. Go over Lesson 6 Functions TCLab again, if you don't remember them.\n", "\n", - "Make a while loop that blinks on and off the __Hot__ LED light. If the temperature gets above 28 degC, then turn on the light on, disconnect the lab after 3 seconds. You don't need to install `tclab` again once it is install the first time. Just use ```import tclab```. It's also useful to print the temperature to see if the program works." + "Make a `while` loop that blinks on and off the __Hot__ LED light. If the temperature gets above 28°C, then turn on the light on, disconnect the lab after 3 seconds. You don't need to install `tclab` again once it is installed the first time, just use ```import tclab```. It's also useful to print the temperature to see if the program works and the temperature is changing." ] }, { @@ -325,7 +323,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/08. Input.ipynb b/08. Input.ipynb index ea0d848..dd9fb9b 100644 --- a/08. Input.ipynb +++ b/08. Input.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "Input simply requests information from the person using the computer. By default the input value is stored as a __string__ so if you're doing a math equation you need to turn it into an __integer__ or __float__. In an egg temperature controller, certain types of eggs may require a different input and you could put that in your code to change the desired temperature. You could also use `input` to manually change power to the heaters.\n", "\n", - "[![Input](http://img.youtube.com/vi/63P8tLh-j5o/0.jpg)](https://www.youtube.com/watch?v=63P8tLh-j5o&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Input\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=63P8tLh-j5o&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Input](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython08.png)](https://www.youtube.com/watch?v=63P8tLh-j5o&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Input\")\n", "\n", "If you run the code below, it asks you for a number, then comes up as an error. You need to turn ```eggs``` __variable__ into an __int__. \n", "\n", @@ -57,7 +58,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -115,7 +115,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/09. If Statements.ipynb b/09. If Statements.ipynb index 84941db..ff4f237 100644 --- a/09. If Statements.ipynb +++ b/09. If Statements.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "If and else statements tell the computer what to do based on a `True` condition.\n", "\n", - "[![Conditionals: if](http://img.youtube.com/vi/aNB2MQecPNk/0.jpg)](https://www.youtube.com/watch?v=aNB2MQecPNk&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Conditionals: if\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=aNB2MQecPNk&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Conditionals: if](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython09.png)](https://www.youtube.com/watch?v=aNB2MQecPNk&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Conditionals: if\")\n", "\n", "This could be used for the temperature of the egg by telling the heaters to turn on, if the egg is too cold.\n", "\n", @@ -77,7 +78,7 @@ "metadata": {}, "source": [ "## elif\n", - "```elif```, or else if, statements are a continued if statement. When the first if doesn't work, it will go down to the next ```elif``` and so on. You can have as many ```elif``` statements as you need. Check your understanding by using the right input value to get ```elif``` statement to run." + "```elif```, or else if, statements are a continued if statement. When the first condition isn't true, it will go down to the next ```elif``` and so on. You can have as many ```elif``` statements as you need. Check your understanding by using the right input value to get ```elif``` statement to run." ] }, { @@ -127,7 +128,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -210,7 +210,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/10. Lists and Tuples.ipynb b/10. Lists and Tuples.ipynb index 89b2cc8..e2f6fc3 100644 --- a/10. Lists and Tuples.ipynb +++ b/10. Lists and Tuples.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "Lists are a way of storing a sequence of values and possibly different types of information in just one __variable__.\n", "\n", - "[![Lists and Tuples](http://img.youtube.com/vi/1CPP8aB-8WU/0.jpg)](https://www.youtube.com/watch?v=1CPP8aB-8WU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Lists and Tuples\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=1CPP8aB-8WU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Lists and Tuples](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython10.png)](https://www.youtube.com/watch?v=1CPP8aB-8WU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Lists and Tuples\")\n", "\n", "This is shown below, by using brackets \\[ ]. You could use lists, for an incubator, to keep information on which chickens are in different eggs. You could also use them to store a previous temperature of the incubator.\n", "\n", @@ -180,7 +181,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -255,7 +255,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/11. Dictionaries.ipynb b/11. Dictionaries.ipynb index 8a2f3f6..f9dc7cd 100644 --- a/11. Dictionaries.ipynb +++ b/11. Dictionaries.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -11,7 +10,9 @@ "\n", "Dictionaries are a list with key and value pairs.\n", "\n", - "[![Dictionaries](http://img.youtube.com/vi/klEt6bU0bYg/0.jpg)](https://www.youtube.com/watch?v=klEt6bU0bYg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Dictionaries\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=klEt6bU0bYg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Dictionaries](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython11.png)](https://www.youtube.com/watch?v=klEt6bU0bYg&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Dictionaries\")\n", "\n", "The format for this method of storing values is curly brackets ```{}``` as seen below. After you assign a dictionary a name, you can enter values by putting a value followed by a colon to indicate the corresponding value. Multiple corresponding values in a dictionary are separated by commas. You can also print the corresponding value of the key, using brackets ```[]```." ] @@ -80,7 +81,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ diff --git a/12. Plotting.ipynb b/12. Plotting.ipynb index c1bb31b..698dab3 100644 --- a/12. Plotting.ipynb +++ b/12. Plotting.ipynb @@ -10,7 +10,9 @@ "\n", "A plot is a visual representation of the data and is especially valuable to analyze data graphically. You can plot with the ```matplotlib``` package.\n", "\n", - "[![Plots](http://img.youtube.com/vi/yyLqmP1AEuU/0.jpg)](https://www.youtube.com/watch?v=yyLqmP1AEuU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Plots\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=yyLqmP1AEuU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Plots](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython12.png)](https://www.youtube.com/watch?v=yyLqmP1AEuU&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Plots\")\n", "\n", "In the incubator example, we may want to see how the temperature changes with time. The ```x```-axis may be __time__ and ```y```-axis may be the __data__. In an incubator, graphs could be used for a number of things. Some could be heater percentage, egg temperature, and much more.\n", "\n", @@ -255,7 +257,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Make the plotting lines modified to your liking. Because you're using two heaters, you should have two lines to represent the two temperatures. Use what programming principles are necessary, and if needed review some basics." + "Make the plotting lines modified to your liking. Because you're using two heaters, you should have two lines to represent the two temperatures." ] }, { @@ -294,7 +296,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/Basic Python Knowledge.ipynb b/Basic Python Knowledge.ipynb index f605f56..8c63794 100644 --- a/Basic Python Knowledge.ipynb +++ b/Basic Python Knowledge.ipynb @@ -3,7 +3,6 @@ { "attachments": { "search.png": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAACT4A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B0hE8AAAAAAAAAAMBk/vz5H2NVNmg0XG07AAAAAElFTkSuQmCC" } }, @@ -147,7 +146,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.5" } }, "nbformat": 4, diff --git a/BeginPython.png b/BeginPython.png new file mode 100644 index 0000000..6539ebe Binary files /dev/null and b/BeginPython.png differ diff --git a/README.md b/README.md index 5293ede..7c901db 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Welcome to this introductory course on Python! This course is intended to help you start programming in Python from little or no prior experience. There are video tutorials for each exercise if you have questions along the way. One of the unique things about this course is that you work on basic elements to help you with a temperature control project. You will see your Python code have a real effect by adjusting heaters to maintain a target temperature, just like a thermostat in a home or office. -[![Begin Python](http://img.youtube.com/vi/EO_YpBs8cs0/0.jpg)](https://www.youtube.com/watch?v=EO_YpBs8cs0 "Begin Python") +[![Begin Python](https://apmonitor.com/che263/uploads/Begin_Python/BeginPython00.png)](https://www.youtube.com/watch?v=EO_YpBs8cs0 "Begin Python") One of the best ways to start or review a programming language is to work on a simple project. These exercises are designed to teach basic Python programming skills to help you design a temperature controller. Temperature control is found in many applications such as home or office HVAC, manufacturing processes, transportation, and life sciences. Even our bodies regulate temperature to a specific set point. This project is to regulate the temperature of the TCLab. Each TCLab has thermochromic (changes color with temperature) paint that turns from black to purple when the temperature reaches the target temperature of 37°C (99°F). @@ -31,13 +31,23 @@ There are 12 lessons to help you with the objective of designing the temperature You will need a [TCLab kit](https://apmonitor.com/heat.htm) to complete the exercises and they are available for [purchase on Amazon](https://www.amazon.com/TCLab-Temperature-Control-Lab/dp/B07GMFWMRY). -![Temperature Control Lab](http://apmonitor.com/pdc/uploads/Main/tclab_connect.png "TCLab") +![Temperature Control Lab](https://apmonitor.com/pdc/uploads/Main/tclab_connect.png "TCLab") **Install Python** -[Download and install Anaconda to use Jupyter](https://docs.anaconda.com/anaconda/install/) or [watch a video on how to install Anaconda](https://youtu.be/LrMOrMb8-3s). +[Download and install Python](https://www.anaconda.com/products/individual) or watch a video on how to install Python. -[![Install Anaconda](http://img.youtube.com/vi/LrMOrMb8-3s/0.jpg)](https://www.youtube.com/watch?v=LrMOrMb8-3s "Install Anaconda") +**[Install Python on Windows](https://youtu.be/_BHsM452vK0)** + + [![Install Python on Windows](https://img.youtube.com/vi/_BHsM452vK0/0.jpg)](https://www.youtube.com/watch?v=_BHsM452vK0 "Install Python on Windows") + +**[Install Python on MacOS](https://youtu.be/2VECcPofhP8)** + + [![Install Python on MacOS](https://img.youtube.com/vi/2VECcPofhP8/0.jpg)](https://www.youtube.com/watch?v=2VECcPofhP8 "Install Python on MacOS") + +**[Install Python on Linux](https://youtu.be/eUq-6ZuwC_A)** + + [![Install Python on Linux](https://img.youtube.com/vi/eUq-6ZuwC_A/0.jpg)](https://www.youtube.com/watch?v=eUq-6ZuwC_A "Install Python on Linux") There are additional instructions on how to [install Python and manage modules](https://apmonitor.com/pdc/index.php/Main/InstallPython). @@ -47,6 +57,6 @@ We would love to hear any feedback or problems you would like to send us! We are **Additional Resources** -- [Temperature Control Lab (TCLab) Kit](http://apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl) +- [Temperature Control Lab (TCLab) Kit](https://apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl) - [Engineering Programming Course](https://apmonitor.com/pdc) with [Source Code](https://github.com/APMonitor/learn_python) - [Jupyter as interactive environment for Python, Julia, R](https://jupyter.org/) diff --git a/TCLab Help.ipynb b/TCLab Help.ipynb index 2f9b362..aa8443d 100644 --- a/TCLab Help.ipynb +++ b/TCLab Help.ipynb @@ -178,7 +178,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.5" } }, "nbformat": 4, diff --git a/XX. Final Project.ipynb b/XX. Final Project.ipynb index dc53b0a..12eebbe 100644 --- a/XX. Final Project.ipynb +++ b/XX. Final Project.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,13 +8,15 @@ "\n", "The final project is to put together all of the basic parts of the course to help you complete a project to design the temperature control for an egg incubator. This is an opportunity for you to review the course material as you use many of the elements that you learned in Lessons 1-12.\n", "\n", - "[![Incubator Project](http://img.youtube.com/vi/5Ry5fKdxNAw/0.jpg)](https://www.youtube.com/watch?v=5Ry5fKdxNAw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Incubator Project\")\n", + "[Python Playlist on YouTube](https://www.youtube.com/watch?v=5Ry5fKdxNAw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46)", + "\n", + "[![Incubator Project](https://apmonitor.com/che263/uploads/Begin_Python/BeginPythonXX.png)](https://www.youtube.com/watch?v=5Ry5fKdxNAw&list=PLLBUgWXdTBDi3J05aMVG1knUpqRhkbc46 \"Incubator Project\")\n", "\n", "A good place to start is to create high-level instructions (pseudo-code) on what you want the program to do. Next, start filling in those parts of the code and test each part as you go. The final test is for 10 minutes but use a shorter time (maybe 10 seconds) as you test your code. Good luck!\n", "\n", "![expert](https://apmonitor.com/che263/uploads/Begin_Python/expert.png)\n", "\n", - "**Objective**: Program the TCLab to maintain the temperature (T1) at 37°C by adjusting the heater (Q1). Display the heater level (Q1) with an LED indicator as the program is adjusting the temperature. Create a plot of the temperature and heater values over a 10 minute evaluation period.\n", + "**Objective**: Program the TCLab to maintain the temperature (`T1`) at 37°C by adjusting the heater (`Q1`). Display the heater level (`Q1`) with an LED indicator as the program is adjusting the temperature. Create a plot of the temperature and heater values over a 10 minute evaluation period.\n", "\n", "![hatch](https://apmonitor.com/che263/uploads/Begin_Python/hatch.png)" ] @@ -44,7 +45,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.5" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/module_images/BeginPython00.png b/module_images/BeginPython00.png new file mode 100644 index 0000000..fcc2beb Binary files /dev/null and b/module_images/BeginPython00.png differ diff --git a/module_images/BeginPython01.png b/module_images/BeginPython01.png new file mode 100644 index 0000000..1c6be93 Binary files /dev/null and b/module_images/BeginPython01.png differ diff --git a/module_images/BeginPython02.png b/module_images/BeginPython02.png new file mode 100644 index 0000000..1570180 Binary files /dev/null and b/module_images/BeginPython02.png differ diff --git a/module_images/BeginPython03.png b/module_images/BeginPython03.png new file mode 100644 index 0000000..8697e6f Binary files /dev/null and b/module_images/BeginPython03.png differ diff --git a/module_images/BeginPython04.png b/module_images/BeginPython04.png new file mode 100644 index 0000000..39210b6 Binary files /dev/null and b/module_images/BeginPython04.png differ diff --git a/module_images/BeginPython05.png b/module_images/BeginPython05.png new file mode 100644 index 0000000..2e9c757 Binary files /dev/null and b/module_images/BeginPython05.png differ diff --git a/module_images/BeginPython06.png b/module_images/BeginPython06.png new file mode 100644 index 0000000..8c92f7a Binary files /dev/null and b/module_images/BeginPython06.png differ diff --git a/module_images/BeginPython07.png b/module_images/BeginPython07.png new file mode 100644 index 0000000..c82265e Binary files /dev/null and b/module_images/BeginPython07.png differ diff --git a/module_images/BeginPython08.png b/module_images/BeginPython08.png new file mode 100644 index 0000000..eaa47e2 Binary files /dev/null and b/module_images/BeginPython08.png differ diff --git a/module_images/BeginPython09.png b/module_images/BeginPython09.png new file mode 100644 index 0000000..4a228d3 Binary files /dev/null and b/module_images/BeginPython09.png differ diff --git a/module_images/BeginPython10.png b/module_images/BeginPython10.png new file mode 100644 index 0000000..a7e91ba Binary files /dev/null and b/module_images/BeginPython10.png differ diff --git a/module_images/BeginPython11.png b/module_images/BeginPython11.png new file mode 100644 index 0000000..5401eeb Binary files /dev/null and b/module_images/BeginPython11.png differ diff --git a/module_images/BeginPython12.png b/module_images/BeginPython12.png new file mode 100644 index 0000000..15b958f Binary files /dev/null and b/module_images/BeginPython12.png differ diff --git a/module_images/BeginPythonXX.png b/module_images/BeginPythonXX.png new file mode 100644 index 0000000..0ec3067 Binary files /dev/null and b/module_images/BeginPythonXX.png differ