Tarea 2 con la tarea 1 hasta abajo

parent b8ed191b
...@@ -308,14 +308,14 @@ ...@@ -308,14 +308,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 74, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"[True, False, True, False, True, False, True, False, True, False]\n" "['Par', 'Non', 'Par', 'Non', 'Par', 'Non', 'Par', 'Non', 'Par', 'Non']\n"
] ]
} }
], ],
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
"par'''\n", "par'''\n",
"\n", "\n",
"def parLogico(l1):\n", "def parLogico(l1):\n",
" par=[True if num%2==0 else False for num in l1]\n", " par=[\"Par\" if num%2==0 else \"Non\" for num in l1]\n",
" return par\n", " return par\n",
"\n", "\n",
"pars=parLogico(a)\n", "pars=parLogico(a)\n",
...@@ -538,14 +538,14 @@ ...@@ -538,14 +538,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"[(4, 3, 5)]\n" "[(4, 3, 5), (5, 12, 13), (6, 8, 10)]\n"
] ]
}, },
{ {
...@@ -554,7 +554,7 @@ ...@@ -554,7 +554,7 @@
"True" "True"
] ]
}, },
"execution_count": 1, "execution_count": 3,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -572,7 +572,7 @@ ...@@ -572,7 +572,7 @@
" yield i, valores - 1, valores + 1\n", " yield i, valores - 1, valores + 1\n",
"\n", "\n",
"\n", "\n",
"print (list(tripletaPita(4)))\n", "print (list(tripletaPita(6)))\n",
"\n", "\n",
"#a,b,c\n", "#a,b,c\n",
"#4,-7,9\n", "#4,-7,9\n",
......
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