Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # programa que pide la edad de una persona y responde su condicion
- # frente al voto
- while True:
- #################################################
- 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("Edad incorrecta")
- #######################################################
- opcion = input("Presione cualquier tecla ('x' para salir): ")
- if opcion == "x":
- print("Gracias por usar este programa....")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement