Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tap1012
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
tap1012
Commits
60023428
Commit
60023428
authored
Feb 07, 2019
by
geobumac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examen1 corren faltantes
parent
171629ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
+30
-14
04-Test1-checkpoint.ipynb
.ipynb_checkpoints/04-Test1-checkpoint.ipynb
+15
-7
04-Test1.ipynb
04-Test1.ipynb
+15
-7
No files found.
.ipynb_checkpoints/04-Test1-checkpoint.ipynb
View file @
60023428
...
@@ -119,16 +119,16 @@
...
@@ -119,16 +119,16 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 3
5
,
"execution_count": 3
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"
1
"
"
3628800
"
]
]
},
},
"execution_count": 3
5
,
"execution_count": 3
9
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
" return 1\n",
" return 1\n",
" else:\n",
" else:\n",
" return numero * ejercicio3( numero - 1 )\n",
" return numero * ejercicio3( numero - 1 )\n",
"ejercicio3(0)\n",
"ejercicio3(
1
0)\n",
"#import doctest\n",
"#import doctest\n",
"#doctest.run_docstring_examples(ejercicio3, globals(), verbose=True)"
"#doctest.run_docstring_examples(ejercicio3, globals(), verbose=True)"
]
]
...
@@ -168,9 +168,17 @@
...
@@ -168,9 +168,17 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
42
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 3, 5, 7, 9, 11, 33, 55, 77, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 909, 919, 929, 939, 949, 959, 969, 979, 989, 999]\n"
]
}
],
"source": [
"source": [
"def ejercicio4(minimo, maximo):\n",
"def ejercicio4(minimo, maximo):\n",
" \"\"\"ejercicio4 funcion que devuelve una lista de elementos los cuales son impares y palindormos\n",
" \"\"\"ejercicio4 funcion que devuelve una lista de elementos los cuales son impares y palindormos\n",
...
@@ -192,7 +200,7 @@
...
@@ -192,7 +200,7 @@
" impares = [i for i in range(minimo, maximo) if i%2 != 0]\n",
" impares = [i for i in range(minimo, maximo) if i%2 != 0]\n",
" #reversestring = [int(str(i)[::-1]) for i in impares]\n",
" #reversestring = [int(str(i)[::-1]) for i in impares]\n",
" return list(filter(lambda x: x == int(str(x)[::-1]), impares))\n",
" return list(filter(lambda x: x == int(str(x)[::-1]), impares))\n",
"print(ejercicio4(0,10))\n",
"print(ejercicio4(0,10
00
))\n",
"#import doctest\n",
"#import doctest\n",
"#doctest.run_docstring_examples(ejercicio4, globals(), verbose=True)"
"#doctest.run_docstring_examples(ejercicio4, globals(), verbose=True)"
]
]
...
...
04-Test1.ipynb
View file @
60023428
...
@@ -119,16 +119,16 @@
...
@@ -119,16 +119,16 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 3
5
,
"execution_count": 3
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"
1
"
"
3628800
"
]
]
},
},
"execution_count": 3
5
,
"execution_count": 3
9
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
" return 1\n",
" return 1\n",
" else:\n",
" else:\n",
" return numero * ejercicio3( numero - 1 )\n",
" return numero * ejercicio3( numero - 1 )\n",
"ejercicio3(0)\n",
"ejercicio3(
1
0)\n",
"#import doctest\n",
"#import doctest\n",
"#doctest.run_docstring_examples(ejercicio3, globals(), verbose=True)"
"#doctest.run_docstring_examples(ejercicio3, globals(), verbose=True)"
]
]
...
@@ -168,9 +168,17 @@
...
@@ -168,9 +168,17 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
42
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 3, 5, 7, 9, 11, 33, 55, 77, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 909, 919, 929, 939, 949, 959, 969, 979, 989, 999]\n"
]
}
],
"source": [
"source": [
"def ejercicio4(minimo, maximo):\n",
"def ejercicio4(minimo, maximo):\n",
" \"\"\"ejercicio4 funcion que devuelve una lista de elementos los cuales son impares y palindormos\n",
" \"\"\"ejercicio4 funcion que devuelve una lista de elementos los cuales son impares y palindormos\n",
...
@@ -192,7 +200,7 @@
...
@@ -192,7 +200,7 @@
" impares = [i for i in range(minimo, maximo) if i%2 != 0]\n",
" impares = [i for i in range(minimo, maximo) if i%2 != 0]\n",
" #reversestring = [int(str(i)[::-1]) for i in impares]\n",
" #reversestring = [int(str(i)[::-1]) for i in impares]\n",
" return list(filter(lambda x: x == int(str(x)[::-1]), impares))\n",
" return list(filter(lambda x: x == int(str(x)[::-1]), impares))\n",
"print(ejercicio4(0,10))\n",
"print(ejercicio4(0,10
00
))\n",
"#import doctest\n",
"#import doctest\n",
"#doctest.run_docstring_examples(ejercicio4, globals(), verbose=True)"
"#doctest.run_docstring_examples(ejercicio4, globals(), verbose=True)"
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment