You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

569 lines
157 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "79908dc6",
"metadata": {},
"source": [
"# How Jupyter works"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "408602ca",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'x' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn [1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mx\u001b[49m)\n",
"\u001b[0;31mNameError\u001b[0m: name 'x' is not defined"
]
}
],
"source": [
"print(x)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "598f5bed",
"metadata": {},
"outputs": [],
"source": [
"x=3"
]
},
{
"cell_type": "markdown",
"id": "77d75f52",
"metadata": {},
"source": [
"## Basic commands\n",
"\n",
"Jupyter Notebook is widely used for data analysis. The notebooks documents are documents produced by the Jupyter Notebook App, which can contain both code (e.g. Python) and rich text elements (paragraphs, equations, links, etc.).\n",
"\n",
"The Jupyter Notebook App is a client-server application that allows editing and running notebook documents by a browser.\n",
"\n",
"### Shortcuts in both modes:\n",
"- Shift + Enter run the current cell, select below\n",
"- Ctrl + Enter run selected cells\n",
"- Alt + Enter run the current cell, insert below\n",
"- Ctrl + S save and checkpoint"
]
},
{
"cell_type": "markdown",
"id": "aea23ddf",
"metadata": {},
"source": [
"### While in command mode (press Esc to activate):\n",
"\n",
"**Enter take you into edit mode** and also **considers that some commands en Google collab have been modified and require first the `Ctr+M` command** and then the command that you need like change the cell type to Markdown:\n",
"\n",
"- H show all shortcuts `Ctr+M`\n",
"- Up select cell above\n",
"- Down select cell below\n",
"- Shift + Up extend selected cells above\n",
"- Shift + Down extend selected cells below\n",
"- A insert cell above\n",
"- B insert cell below\n",
"- X cut selected cells\n",
"- C copy selected cells\n",
"- V paste cells below\n",
"- Shift + V paste cells above\n",
"- D, D (press the key twice) delete selected cells `Ctr+M`\n",
"- Z undo cell deletion\n",
"- S Save and Checkpoint `Ctr+M`\n",
"- Y change the cell type to Code `Ctr+M` \n",
"- M change the cell type to Markdown `Ctr+M`\n",
"- P open the command palette `Ctr+M`\n",
"\n",
"This dialog helps you run any command by name. Its really useful if you dont know some shortcut or when you dont have a shortcut for the wanted command.\n",
"\n",
"- Shift + Space scroll notebook up\n",
"- Space scroll notebook down"
]
},
{
"cell_type": "markdown",
"id": "6066c3fc",
"metadata": {},
"source": [
"### While in edit mode (press Enter to activate)\n",
"- Esc take you into command mode\n",
"- Tab code completion or indent\n",
"- Shift + Tab tooltip\n",
"- Ctrl + ] indent\n",
"- Ctrl + [ dedent\n",
"- Ctrl + A select all\n",
"- Ctrl + Z undo\n",
"- Ctrl + Shift + Z or Ctrl + Y redo\n",
"- Ctrl + Home go to cell start\n",
"- Ctrl + End go to cell end\n",
"- Ctrl + Left go one word left\n",
"- Ctrl + Right go one word right\n",
"- Ctrl + Shift + P open the command palette\n",
"- Down move cursor down\n",
"- Up move cursor up"
]
},
{
"cell_type": "markdown",
"id": "dad4c1fb",
"metadata": {},
"source": [
"# Basics of Python and Programming\n",
"## Using conditionals"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "9272c3fd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"El valor es positivo\n"
]
}
],
"source": [
"x = 1 #int(input('Introduce un numero: '))\n",
"if x<0:\n",
" print('El valor es negativo')\n",
"else:\n",
" print(\"El valor es positivo\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "90916e74",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduce un numero: -5\n",
"El valor es negativo\n"
]
}
],
"source": [
"x = int(input('Introduce un numero: '))\n",
"if x<0:\n",
" print('El valor es negativo')\n",
"else:\n",
" print(\"El valor es positivo\")"
]
},
{
"cell_type": "markdown",
"id": "e246b55e",
"metadata": {},
"source": [
"## Using for loops"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "7d68db25",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"juan\n",
"israel\n",
"jonathan\n",
"homero\n"
]
}
],
"source": [
"nombres = ['juan', 'israel', 'jonathan', 'homero']\n",
"for n in nombres:\n",
" print(n)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b5a09022",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"2\n",
"3\n",
"4\n",
"5\n",
"6\n",
"7\n",
"8\n",
"9\n",
"10\n"
]
}
],
"source": [
"for n in range(1,11):\n",
" print(n)"
]
},
{
"cell_type": "markdown",
"id": "e163a7e0",
"metadata": {},
"source": [
"## Arrays and indexing"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "d98ef5bd",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"a = np.array([[1,2],[3,4],[5,6]])"
]
},
{
"cell_type": "markdown",
"id": "096d51b8",
"metadata": {},
"source": [
"## Functions "
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "fd363297",
"metadata": {},
"outputs": [],
"source": [
"# how to crate functions\n",
"def myFuncion(x):\n",
" y = np.sin(x)/np.cos(x)\n",
" return y"
]
},
{
"cell_type": "markdown",
"id": "d8fada9a",
"metadata": {},
"source": [
"## Making basic plots"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b956d7c9",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAABpAklEQVR4nO3dd3xV9f3H8de9N7k3e29I2H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qvvPIK0dHRnu0VFRW8+uqrPP3000ycOJGMjAzmz5/P8uXLWblypbfLEhEvK/6kmHVnrmPPw3t8XYqI+DGvB5UZM2YwZcoUJk2a1GR7ZmYm9fX1TbYPHjyYtLQ0VqxY4e2yRMTLbPtsVHxfQe32Ws+2TRdtYmnQUgrf1S1eEWkbr/Zoe/fdd8nKymLNmjXNHisoKMBsNhMVFdVke2JiIgUFBa2+ps1mw2azeX6urKzssHpFpOPEXhCLpacFc/Kh0T0uhwuXzYWzVgsTikjbeC2o5Obmcuedd7Jo0SKCgoI67HXnzJnDI4880mGvJyLeEdwvmOB+TTvNDnplEK4GF4FxgT6qSkT8jddu/WRmZlJUVER6ejoBAQEEBASwdOlSnn32WQICAkhMTMRut1NeXt7keYWFhSQlJbX6uvfffz8VFRWer9zcXG/9CSLSwSwpFoLSgjCFmHxdioj4Ca+1qJxzzjls2rSpybZf/epXDB48mN/97nekpqYSGBjI4sWLmTp1KgDbt28nJyeH8ePHt/q6FosFi0XrhYh0ddU/VlNfUk9w32Ct8SMix8xrQSU8PJzhw4c32RYaGkpsbKxn+/X
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"time = np.linspace(0,10)\n",
"y = myFuncion(time)\n",
"y2 = np.tan(time)\n",
"plt.plot(time, y/2,'-g*')\n",
"plt.plot(time, y2, ':m+')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "280bf852",
"metadata": {},
"source": [
"### Subplot"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "048067ac",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGdCAYAAAAvwBgXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB3BUl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DV7xIiiD5KkQtGZUNVu3wZatQLu32cnz/PngeBg3qm0W926wIULbF+M+HjWMnLxIu9UhPCVn882e1u9mrUgrl7NBqbSB57yMzNjs/cmT2bXw8LYh0gaMF+h6BWqSlFRbKZHUhLbPffKFaBxY96pdIO7Oxtf07w52x+jY0daiZXor5wc1gWzYwcbR7V9OzB6NO9UukEkAubPL1rr6YcfgIkT2UKUpEJQIaIqf//NZsa8esX2bThzBnBx4Z1Kt9jbsxVog4LY1t6ffML2jSBEn6SnA507A0ePsq7fAweA/v15p9ItIhEwbRobMA+wqdDDh7MuG/LRqBBRhfBw9sYglQJt2rBN6+zseKfSTebmwP79bA0WmYztG7FwIe9UhKhHUhLbOffvvwFra/Ze06UL71S664sv2IcdiYQtQBkcTGuNVAAqRCra4cNs1cKcnKJPKTRQTLUMDYH169kaIwDrz/3vf6kfl+i2p0/Z+LMbN9iiiBERbKVmolqffsqWEDA2ZuuydO/Otuog5UaFSEXatYv10+blsfn6Bw6wwU5E9cRitoX5/Pns+oIFbL8aKkaILrp7lxUdDx8W7c/UoAHvVPrjk0/Yh0wLC9YCHhDAuuFJuVAhUlE2bmS
"text/plain": [
"<Figure size 640x480 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.subplot(3,1,1)\n",
"plt.plot(time, np.sin(time),'r', label='$y_1$')\n",
"plt.legend()\n",
"plt.subplot(3,1,2)\n",
"plt.plot(time, np.cos(time),'g',label='y2')\n",
"plt.legend()\n",
"plt.subplot(3,1,3)\n",
"plt.plot(time, np.tan(time),'k', label='y3')\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "4be8971b",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiQAAACjCAYAAAC62QU5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6Bh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VetU6jGd7J1Y228tgW6BHIk/wsgNI0s9pl6cP3+e/v37U7t2bZ588kl8fHzYuXMnFf97Pb7zzjv06NGDvn370q5dO/z9/fnuu+90Vm3bqAiJBTH3upE5KdVa5vz5MkehXDkhDhwwr7DcXCG6dJHjBweX/XySgwcLtkrPn2/+8RctkmM7Ogqxb5/Zh9djTdxcc47/abwgDFFpXiURlxZnJnXWybXsa6LBBw0EYYjun3e/aVtvadkRs0PYT7cXhCG+OfiNWcfWClu23bLChAkTTDkk1apV01uOzWB1OSS6cegQTJ4szxctggYNzDu+vT2Eh4Onp9xxkr97pyySlyeXU7Kz5a6Ykubg3ImXXpKRp5wcGDYMcnPNP4eN8lbHt2hYqSGX0y8z8oeRpnYKZZFJWyZx8PJB/Cr4Ed473OyVVlve15LJD8n3hdEbRxOXFmfW8RVlE7VkYznKnkNiNMpch5wc6NFDnmtBQAC89548Dwsru0s3774rt+a6u8OyZdqUfTcYZNl5Ly/Ytw8WLDD/HDZKOYdyfN7nc5zsnfj+2Pd8+s+nekvShJ3nd/L+7vcBCO8dTqUKlTSZ542H36CRXyMSMhIYvXF0mXbwFObh+iWbpKQkjDe2xlCYjbLnkCxbJgtwubrCBx9o2zfl2We
"text/plain": [
"<Figure size 640x480 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.subplot(6,3,1)\n",
"plt.plot(time, np.sin(time),'r', label='y_1')\n",
"plt.subplot(6,3,2)\n",
"plt.plot(time, np.cos(time),'g',label='y2')\n",
"plt.subplot(6,3,3)\n",
"plt.plot(time, np.tan(time),'k', label='y3')\n",
"plt.subplot(6,3,4)\n",
"plt.plot(time, np.sin(time),'r', label='$y_1$')\n",
"plt.subplot(6,3,5)\n",
"plt.plot(time, np.cos(time),'g',label='y2')\n",
"plt.subplot(6,3,6)\n",
"plt.plot(time, np.tan(time),'k', label='$y_1$')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "8236e97a",
"metadata": {},
"source": [
"# Some additions task and work"
]
},
{
"cell_type": "markdown",
"id": "937e9070",
"metadata": {},
"source": [
"- Make function that computes the factorial of a given numer using for loops\n",
"- Make a function that computes 4 functions (sin, cos, tan, logistic) and plots \n",
"- Make a function that recive your age and classifies you as baby, teenager, ...."
]
},
{
"cell_type": "markdown",
"id": "f60bf212",
"metadata": {},
"source": [
"## factorial"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "2eee578a",
"metadata": {},
"outputs": [],
"source": [
"def factorial(argument):\n",
" mul=1\n",
" for n in range(1,argument):\n",
" prod = mul*(n+1)\n",
" mul = prod\n",
" print(prod)\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "9c9addfe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2\n",
"6\n",
"24\n",
"120\n",
"720\n",
"5040\n"
]
}
],
"source": [
"factorial(7)"
]
},
{
"cell_type": "markdown",
"id": "841a2854",
"metadata": {},
"source": [
"## making plots"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "d19216c9",
"metadata": {},
"outputs": [],
"source": [
"def myPlots(x):\n",
" y1 = np.sin(x)\n",
" y2 = np.cos(x)\n",
" y3 = np.tan(x)\n",
" y4 = 1/(1+np.exp(-x))\n",
" #plots\n",
" plt.figure(figsize=(10,10))\n",
" plt.subplot(4,4,1)\n",
" plt.plot(x, y1)\n",
" plt.subplot(4,4,2)\n",
" plt.plot(x, y2)\n",
" plt.subplot(4,4,3)\n",
" plt.plot(x, y3)\n",
" plt.subplot(4,4,4)\n",
" plt.plot(x, y4)\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "322fae49",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0cAAADTCAYAAABKpWhLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAA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FoBALFZ7vyKXPzzgAN7G7p1LZN6xNkDb4BHltWEieFmPnuaGZdMzVeltG6srpPt9W1o7u4Pq6OJmTqDgcN1c0qw61QXDoUDVr3i8QXxSWM3ADFzxFg6KR9bOhtRe/wMLp9eqJF1I3OsrRe+oHjfLwuvW4OBw60XTsD3/nEIv609jVsWk6w3MXqJrmpIhQqHWBmrnylEbBxoduHu3+xGi8sLo4HDfVdOxT3LJqdEn69a0JXQAXVhpa4LKvMGPP//wkppLHjSKzWHxZK0CypzB6Rez6/IBSD2ZeiZT5tEJ3xuuX1AQ66apXVjESZ+cdPC8bCZI7X+s0pFpbpDLfqem7HrVCeCvIDxuWkoz4vssrFAiZXc6RV2fWeWZg8IgL54/njYzAYcdvRgb0O3RtYRhPJEZ468oyhzRBBDcajFja88twMtLi8qx6Xjz/csxdevnEqB0VnQ1dCYEC/gSDg4mlEyMDuxcIIYXJzu7NP1rtbbh8WSuitnDJyTcP6EHADAxw1dw+5iaQ3b/Z87PmfA88tnFcFs5FQprRtrCIKAnSfFsrMbFgwU7GDroMXlRZdHvxK7Z5fUMVhwdLDFBVd/QHW7YuVQqxgczSoZqKpnTzdLa1nvpYEEkQz9/khf3WgqqyOIwTji7MF
"text/plain": [
"<Figure size 1000x1000 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"x = np.linspace(-10,10)\n",
"myPlots(x)"
]
},
{
"cell_type": "markdown",
"id": "1637262f",
"metadata": {},
"source": [
"## Age classificator"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "25857354",
"metadata": {},
"outputs": [],
"source": [
"def AgeClassificator(age):\n",
" if age<=2:\n",
" print('You are a baby')\n",
" else: \n",
" if age <=12:\n",
" print('you are a children')\n",
" else:\n",
" if age<=18:\n",
" print('you are a teenager')\n",
" else:\n",
" if age <=40:\n",
" print('you are young')\n",
" else:\n",
" print('You are old-younger')\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "744b17f9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"You are old-younger\n"
]
}
],
"source": [
"AgeClassificator(41)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}