You've already forked Curso-lenguaje-python
Restructure content and add notes from HolaMundo
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
15
HolaMundo/02_if02.py
Normal file
15
HolaMundo/02_if02.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Condicionales con if
|
||||
"""
|
||||
|
||||
edad = input("Introduce tu edad: ")
|
||||
edad = int(edad)
|
||||
|
||||
if edad > 65:
|
||||
print("Tienes un super descuento para super seniors")
|
||||
elif edad > 55:
|
||||
print("Tienes un descuento para seniors")
|
||||
elif edad > 17:
|
||||
print("Puedes entrar")
|
||||
else:
|
||||
print("Lo siento, eres menor de edad. Debes irte")
|
||||
Reference in New Issue
Block a user