Skip to content

Commit c6d3eab

Browse files
committed
Creado con Colaboratory
1 parent f4989e7 commit c6d3eab

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

7_Rebound_exercise.ipynb

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"provenance": [],
7+
"authorship_tag": "ABX9TyMPTnz5FNe1o7aRmzgU3QJk"
8+
},
9+
"kernelspec": {
10+
"name": "python3",
11+
"display_name": "Python 3"
12+
},
13+
"language_info": {
14+
"name": "python"
15+
}
16+
},
17+
"cells": [
18+
{
19+
"cell_type": "code",
20+
"execution_count": 2,
21+
"metadata": {
22+
"colab": {
23+
"base_uri": "https://localhost:8080/"
24+
},
25+
"id": "sYO8KkigL2eU",
26+
"outputId": "d6bbcf0b-019a-44b8-93b4-7a20e331bf4a"
27+
},
28+
"outputs": [
29+
{
30+
"output_type": "stream",
31+
"name": "stdout",
32+
"text": [
33+
"Ingrese su edad: 15\n",
34+
"Usted no es un adulto.\n"
35+
]
36+
}
37+
],
38+
"source": [
39+
"while True:\n",
40+
" try:\n",
41+
" edad = int(input(\"Ingrese su edad: \"))\n",
42+
" if edad >= 18:\n",
43+
" print(\"Usted es un adulto.\")\n",
44+
" else:\n",
45+
" print(\"Usted no es un adulto.\")\n",
46+
" break\n",
47+
" except ValueError:\n",
48+
" print(\"Error: Debe ingresar un número entero. Por favor, intente nuevamente.\")\n"
49+
]
50+
}
51+
]
52+
}

0 commit comments

Comments
 (0)