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
ef86e63b
Commit
ef86e63b
authored
Jan 24, 2019
by
Alejandro Molina Villegas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actualización de ejercicios
parent
fb92341b
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6863 additions
and
50 deletions
+6863
-50
01-DataTypes&ControlFlow.ipynb
01-DataTypes&ControlFlow.ipynb
+62
-34
02-Comprehension&Documentation.ipynb
02-Comprehension&Documentation.ipynb
+6801
-16
No files found.
01-DataTypes&ControlFlow.ipynb
View file @
ef86e63b
...
...
@@ -959,7 +959,7 @@
},
{
"cell_type": "code",
"execution_count":
46
,
"execution_count":
3
,
"metadata": {},
"outputs": [
{
...
...
@@ -1007,6 +1007,34 @@
"test_list2set()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"2\n",
"2\n",
"3\n",
"3\n",
"3\n",
"3\n",
"4\n",
"5\n",
"5\n"
]
}
],
"source": [
"a = [1,2,2,3,3,3,3,4,5,5]\n",
"for i in a:\n",
" print(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
...
...
@@ -1069,44 +1097,13 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
1
,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a True\n",
"b True\n",
"c True\n",
"d True\n",
"e True\n",
"f True\n",
"g True\n",
"h True\n",
"i True\n",
"j True\n",
"k True\n",
"l True\n",
"m True\n",
"n True\n",
"ñ True\n",
"o True\n",
"p True\n",
"q True\n",
"r True\n",
"s True\n",
"t True\n",
"u True\n",
"v True\n",
"w True\n",
"x True\n",
"y True\n",
"z True\n",
"27 True\n",
"a True\n",
"b False\n",
"2 False\n",
"OK\n"
]
}
...
...
@@ -1115,7 +1112,11 @@
"def test_pangram():\n",
" pangram = \"jovencillo emponzoñado de whisky , qué figurota exhibe !\"\n",
" nopangram = \"Agua pasa por mi casa\"\n",
" print(\"OK\" if is_pangram(pangram) and not is_pangram(nopangram) else \"KO\")\n",
" print(\"OK\" if gpangram(pangram) and not gpangram(nopangram) else \"KO\")\n",
"\n",
"def gpangram(phrase):\n",
" alphabet=\"abcdefghijklmnñopqrstuvwxyz\"\n",
" return(not(set(alphabet)-set(phrase)))\n",
"\n",
"def is_pangram(string):\n",
" alfabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n",
...
...
@@ -1156,6 +1157,33 @@
"999999999"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"1\n",
"22\n",
"333\n",
"4444\n",
"55555\n",
"666666\n",
"7777777\n",
"88888888\n",
"999999999\n"
]
}
],
"source": [
"for i in range(10):\n",
" print(str(i)*i)"
]
},
{
"cell_type": "code",
"execution_count": null,
...
...
02-Comprehension&Documentation.ipynb
View file @
ef86e63b
This diff is collapsed.
Click to expand it.
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