cambios por Carlos Garcia

parent 2217e3df
......@@ -663,7 +663,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 80,
"metadata": {},
"outputs": [
{
......@@ -877,16 +877,35 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.5.5 Escribe una funcion que sume todos los uneros en una lista."
"### 1.5.5 Escribe una funcion que sume todos los numeros en una lista."
]
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 104,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"20"
]
},
"execution_count": 104,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a = [8, 2, 3, 0, 7]"
"a = [8, 2, 3, 0, 7]\n",
"\n",
"def sumar(lista):\n",
" temp=0\n",
" for numero in lista:\n",
" temp+=numero\n",
" return (temp)\n",
"\n",
"sumar(a)"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment