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
d030e87f
Commit
d030e87f
authored
Feb 07, 2019
by
Carlos David García Hernández
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examen 1
parent
3b5c1109
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
38 deletions
+54
-38
04-Test1-checkpoint.ipynb
.ipynb_checkpoints/04-Test1-checkpoint.ipynb
+27
-19
04-Test1.ipynb
04-Test1.ipynb
+27
-19
No files found.
.ipynb_checkpoints/04-Test1-checkpoint.ipynb
View file @
d030e87f
...
@@ -499,19 +499,17 @@
...
@@ -499,19 +499,17 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 3
19
,
"execution_count": 3
24
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Solo se leer del 1 al 3999\n",
"Ingresar número (Cero para terminar el programa):10\n",
"Ingresar número (Cero para terminar el programa):10\n",
"10:\n",
"10:\n",
"X\n",
"X\n",
"Ingresar número (Cero para terminar el programa):24\n",
"24:\n",
"XXIV\n",
"Ingresar número (Cero para terminar el programa):0\n"
"Ingresar número (Cero para terminar el programa):0\n"
]
]
}
}
...
@@ -519,22 +517,32 @@
...
@@ -519,22 +517,32 @@
"source": [
"source": [
"enteros= [1000, 900, 500, 400,100, 90, 50, 40,10, 9, 5, 4,1] \n",
"enteros= [1000, 900, 500, 400,100, 90, 50, 40,10, 9, 5, 4,1] \n",
"Letras = [\"M\", \"CM\", \"D\", \"CD\",\"C\", \"XC\", \"L\", \"XL\",\"X\", \"IX\", \"V\", \"IV\",\"I\"]\n",
"Letras = [\"M\", \"CM\", \"D\", \"CD\",\"C\", \"XC\", \"L\", \"XL\",\"X\", \"IX\", \"V\", \"IV\",\"I\"]\n",
"romano=\"\"\n",
"class ejercicio7:\n",
"while True:\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" if(x==0):\n",
" break\n",
" print(str(x)+\":\")\n",
" i=0\n",
" \n",
" \n",
" while (x>0):\n",
" def informacion(self):\n",
" if(x>=enteros[i]):\n",
" print(\"Solo se leer del 1 al 3999\")\n",
" x=x-enteros[i]\n",
" \n",
" romano+=Letras[i]\n",
" def cambiar(self):\n",
" else:\n",
" romano=\"\"\n",
" i=i+1\n",
" while True:\n",
" print(romano)\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" romano=\"\""
" if(x==0):\n",
" break\n",
" print(str(x)+\":\")\n",
" i=0\n",
" \n",
" while (x>0):\n",
" if(x>=enteros[i]):\n",
" x=x-enteros[i]\n",
" romano+=Letras[i]\n",
" else:\n",
" i=i+1\n",
" print(romano)\n",
" romano=\"\"\n",
" \n",
"x=ejercicio7()\n",
"x.informacion()\n",
"x.cambiar()"
]
]
},
},
{
{
...
...
04-Test1.ipynb
View file @
d030e87f
...
@@ -499,19 +499,17 @@
...
@@ -499,19 +499,17 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 3
19
,
"execution_count": 3
24
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Solo se leer del 1 al 3999\n",
"Ingresar número (Cero para terminar el programa):10\n",
"Ingresar número (Cero para terminar el programa):10\n",
"10:\n",
"10:\n",
"X\n",
"X\n",
"Ingresar número (Cero para terminar el programa):24\n",
"24:\n",
"XXIV\n",
"Ingresar número (Cero para terminar el programa):0\n"
"Ingresar número (Cero para terminar el programa):0\n"
]
]
}
}
...
@@ -519,22 +517,32 @@
...
@@ -519,22 +517,32 @@
"source": [
"source": [
"enteros= [1000, 900, 500, 400,100, 90, 50, 40,10, 9, 5, 4,1] \n",
"enteros= [1000, 900, 500, 400,100, 90, 50, 40,10, 9, 5, 4,1] \n",
"Letras = [\"M\", \"CM\", \"D\", \"CD\",\"C\", \"XC\", \"L\", \"XL\",\"X\", \"IX\", \"V\", \"IV\",\"I\"]\n",
"Letras = [\"M\", \"CM\", \"D\", \"CD\",\"C\", \"XC\", \"L\", \"XL\",\"X\", \"IX\", \"V\", \"IV\",\"I\"]\n",
"romano=\"\"\n",
"class ejercicio7:\n",
"while True:\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" if(x==0):\n",
" break\n",
" print(str(x)+\":\")\n",
" i=0\n",
" \n",
" \n",
" while (x>0):\n",
" def informacion(self):\n",
" if(x>=enteros[i]):\n",
" print(\"Solo se leer del 1 al 3999\")\n",
" x=x-enteros[i]\n",
" \n",
" romano+=Letras[i]\n",
" def cambiar(self):\n",
" else:\n",
" romano=\"\"\n",
" i=i+1\n",
" while True:\n",
" print(romano)\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" romano=\"\""
" if(x==0):\n",
" break\n",
" print(str(x)+\":\")\n",
" i=0\n",
" \n",
" while (x>0):\n",
" if(x>=enteros[i]):\n",
" x=x-enteros[i]\n",
" romano+=Letras[i]\n",
" else:\n",
" i=i+1\n",
" print(romano)\n",
" romano=\"\"\n",
" \n",
"x=ejercicio7()\n",
"x.informacion()\n",
"x.cambiar()"
]
]
},
},
{
{
...
...
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