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.

391 lines
84 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\n",
"- H show all shortcuts\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\n",
"- Z undo cell deletion\n",
"- S Save and Checkpoint\n",
"- Y change the cell type to Code\n",
"- M change the cell type to Markdown\n",
"- P open the command palette\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": 4,
"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": 7,
"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": 10,
"id": "b956d7c9",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAABpAklEQVR4nO3dd3xV9f3H8de9N7k3e29I2HtJggIuFFF+FjdWq1ixtU4ciNVqraK2FqvWWidiLe46qxZxUURUNgkbgTATyCTzZt2b3Ht/f9zmQkwCCeTm5ob38/HIw+Tcc28+uRzPed/v+Q6Dy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1TbYPHjyYtLQ0VqxY4e2yRMTLbPtsVHxfQe32Ws+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": 11,
"id": "048067ac",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGdCAYAAAAvwBgXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB3BUlEQVR4nO3dd1iTZ9sG8DMJey9ZAoqKE5wo4h4o4qgTF7XuV1utIrVv1b5W2zqqVm217lr3rnsPVKx1IYqjDhyoILIUCENW8nx/3F+CVFRAkjvj+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MF+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": "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": "code",
"execution_count": null,
"id": "9204368f",
"metadata": {},
"outputs": [],
"source": []
}
],
"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
}