examen 1

parent 3b5c1109
......@@ -499,19 +499,17 @@
},
{
"cell_type": "code",
"execution_count": 319,
"execution_count": 324,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Solo se leer del 1 al 3999\n",
"Ingresar número (Cero para terminar el programa):10\n",
"10:\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"
]
}
......@@ -519,8 +517,14 @@
"source": [
"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",
"romano=\"\"\n",
"while True:\n",
"class ejercicio7:\n",
" \n",
" def informacion(self):\n",
" print(\"Solo se leer del 1 al 3999\")\n",
" \n",
" def cambiar(self):\n",
" romano=\"\"\n",
" while True:\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" if(x==0):\n",
" break\n",
......@@ -534,7 +538,11 @@
" else:\n",
" i=i+1\n",
" print(romano)\n",
" romano=\"\""
" romano=\"\"\n",
" \n",
"x=ejercicio7()\n",
"x.informacion()\n",
"x.cambiar()"
]
},
{
......
......@@ -499,19 +499,17 @@
},
{
"cell_type": "code",
"execution_count": 319,
"execution_count": 324,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Solo se leer del 1 al 3999\n",
"Ingresar número (Cero para terminar el programa):10\n",
"10:\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"
]
}
......@@ -519,8 +517,14 @@
"source": [
"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",
"romano=\"\"\n",
"while True:\n",
"class ejercicio7:\n",
" \n",
" def informacion(self):\n",
" print(\"Solo se leer del 1 al 3999\")\n",
" \n",
" def cambiar(self):\n",
" romano=\"\"\n",
" while True:\n",
" x=int(input(\"Ingresar número (Cero para terminar el programa):\"))\n",
" if(x==0):\n",
" break\n",
......@@ -534,7 +538,11 @@
" else:\n",
" i=i+1\n",
" print(romano)\n",
" romano=\"\""
" romano=\"\"\n",
" \n",
"x=ejercicio7()\n",
"x.informacion()\n",
"x.cambiar()"
]
},
{
......
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