└── 1784-python-para-ds-intro-aula1.ipynb /1784-python-para-ds-intro-aula1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "Python para DS - Introducción.ipynb", 7 | "provenance": [] 8 | }, 9 | "kernelspec": { 10 | "name": "python3", 11 | "display_name": "Python 3" 12 | } 13 | }, 14 | "cells": [ 15 | { 16 | "cell_type": "markdown", 17 | "metadata": { 18 | "id": "WC_I5dcwsWi5" 19 | }, 20 | "source": [ 21 | "#**Python para DS - Introducción al Lenguaje**" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "metadata": { 27 | "colab": { 28 | "base_uri": "https://localhost:8080/" 29 | }, 30 | "id": "c7AzkJvVsNrL", 31 | "outputId": "677e8cb0-3552-4554-eeb6-e24f8bf71140" 32 | }, 33 | "source": [ 34 | "1 + 1" 35 | ], 36 | "execution_count": null, 37 | "outputs": [ 38 | { 39 | "output_type": "execute_result", 40 | "data": { 41 | "text/plain": [ 42 | "2" 43 | ] 44 | }, 45 | "metadata": { 46 | "tags": [] 47 | }, 48 | "execution_count": 1 49 | } 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "metadata": { 55 | "colab": { 56 | "base_uri": "https://localhost:8080/", 57 | "height": 35 58 | }, 59 | "id": "2omT3iZgs-Yk", 60 | "outputId": "ca7f40fa-7fe5-4c2a-8c4e-7db8663fa6ec" 61 | }, 62 | "source": [ 63 | "'Christian'" 64 | ], 65 | "execution_count": null, 66 | "outputs": [ 67 | { 68 | "output_type": "execute_result", 69 | "data": { 70 | "application/vnd.google.colaboratory.intrinsic+json": { 71 | "type": "string" 72 | }, 73 | "text/plain": [ 74 | "'Christian'" 75 | ] 76 | }, 77 | "metadata": { 78 | "tags": [] 79 | }, 80 | "execution_count": 3 81 | } 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "metadata": { 87 | "id": "PrqIz20btLEe" 88 | }, 89 | "source": [ 90 | "nombre = 'Juan'" 91 | ], 92 | "execution_count": null, 93 | "outputs": [] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "metadata": { 98 | "colab": { 99 | "base_uri": "https://localhost:8080/", 100 | "height": 35 101 | }, 102 | "id": "9nQdl8yTtkge", 103 | "outputId": "2c981853-44f8-4914-9cc3-937d959f574e" 104 | }, 105 | "source": [ 106 | "nombre" 107 | ], 108 | "execution_count": null, 109 | "outputs": [ 110 | { 111 | "output_type": "execute_result", 112 | "data": { 113 | "application/vnd.google.colaboratory.intrinsic+json": { 114 | "type": "string" 115 | }, 116 | "text/plain": [ 117 | "'Juan'" 118 | ] 119 | }, 120 | "metadata": { 121 | "tags": [] 122 | }, 123 | "execution_count": 14 124 | } 125 | ] 126 | }, 127 | { 128 | "cell_type": "code", 129 | "metadata": { 130 | "id": "ob1AHxpztqxr" 131 | }, 132 | "source": [ 133 | "edad = 30" 134 | ], 135 | "execution_count": null, 136 | "outputs": [] 137 | }, 138 | { 139 | "cell_type": "code", 140 | "metadata": { 141 | "colab": { 142 | "base_uri": "https://localhost:8080/" 143 | }, 144 | "id": "j3O3hrEDtuSM", 145 | "outputId": "bc010c49-ba58-491e-ad31-2c4309d91e02" 146 | }, 147 | "source": [ 148 | "edad" 149 | ], 150 | "execution_count": null, 151 | "outputs": [ 152 | { 153 | "output_type": "execute_result", 154 | "data": { 155 | "text/plain": [ 156 | "30" 157 | ] 158 | }, 159 | "metadata": { 160 | "tags": [] 161 | }, 162 | "execution_count": 10 163 | } 164 | ] 165 | }, 166 | { 167 | "cell_type": "markdown", 168 | "metadata": { 169 | "id": "rhDOvB1RvgxO" 170 | }, 171 | "source": [ 172 | "#Mi primera función" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "metadata": { 178 | "colab": { 179 | "base_uri": "https://localhost:8080/" 180 | }, 181 | "id": "arEYVFMXtvlV", 182 | "outputId": "94865653-8be4-40e1-f6c7-c1b50fbf9b32" 183 | }, 184 | "source": [ 185 | "print('El nombre es Christian y su edad es 29 años')" 186 | ], 187 | "execution_count": null, 188 | "outputs": [ 189 | { 190 | "output_type": "stream", 191 | "text": [ 192 | "El nombre es Christian y su edad es 29 años\n" 193 | ], 194 | "name": "stdout" 195 | } 196 | ] 197 | }, 198 | { 199 | "cell_type": "code", 200 | "metadata": { 201 | "colab": { 202 | "base_uri": "https://localhost:8080/" 203 | }, 204 | "id": "0tjA8D_EveCX", 205 | "outputId": "5041adbc-c973-4622-ee09-107dcc832d36" 206 | }, 207 | "source": [ 208 | "print(f'El nombre es {nombre} y su edad es {edad} años')" 209 | ], 210 | "execution_count": null, 211 | "outputs": [ 212 | { 213 | "output_type": "stream", 214 | "text": [ 215 | "El nombre es Juan y su edad es 30 años\n" 216 | ], 217 | "name": "stdout" 218 | } 219 | ] 220 | }, 221 | { 222 | "cell_type": "code", 223 | "metadata": { 224 | "id": "llJXbTL9wHCN" 225 | }, 226 | "source": [ 227 | "def saludar():\n", 228 | " nombre = input('Digite su nombre: ')\n", 229 | " print(f'Hola {nombre} sea bienvenid@!!!')" 230 | ], 231 | "execution_count": null, 232 | "outputs": [] 233 | }, 234 | { 235 | "cell_type": "code", 236 | "metadata": { 237 | "colab": { 238 | "base_uri": "https://localhost:8080/" 239 | }, 240 | "id": "BSKXYOkUxDOJ", 241 | "outputId": "747d1b37-3e78-434a-a1e1-34e73622587a" 242 | }, 243 | "source": [ 244 | "saludar()" 245 | ], 246 | "execution_count": null, 247 | "outputs": [ 248 | { 249 | "output_type": "stream", 250 | "text": [ 251 | "Digite su nombre: Christian\n", 252 | "Hola Christian sea bienvenid@!!!\n" 253 | ], 254 | "name": "stdout" 255 | } 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "metadata": { 261 | "colab": { 262 | "base_uri": "https://localhost:8080/" 263 | }, 264 | "id": "Q6ARfykJxN6A", 265 | "outputId": "7d55c260-f270-4bdc-dd23-56f6ce7b0373" 266 | }, 267 | "source": [ 268 | "saludar()" 269 | ], 270 | "execution_count": null, 271 | "outputs": [ 272 | { 273 | "output_type": "stream", 274 | "text": [ 275 | "Digite su nombre: Eliana\n", 276 | "Hola Eliana sea bienvenid@!!!\n" 277 | ], 278 | "name": "stdout" 279 | } 280 | ] 281 | } 282 | ] 283 | } --------------------------------------------------------------------------------