Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- print("Programa que determina la condición frente al voto")
- while True:
- print(
- """
- Menu de opciones:
- -----------------
- 1. Ingresar edad
- 2. Salir
- """)
- opcion = input("Por favor, ingrese una opción: ")
- if opcion == "1":
- edad = int(input("Por favor, ingrese su edad: "))
- if 0 < edad < 16:
- print("Voto prohibido")
- elif 16 <= edad < 18 or edad >= 70:
- print("Voto optativo")
- elif 18 <= edad < 70:
- print("Voto obligatorio")
- else:
- print("error en el ingreso de la edad")
- elif opcion == "2":
- print("Gracias por usar este programa...")
- break
- else:
- print("Opción incorrecta")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement