Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
def menu():
opcion = eval(input(
"""
********************************************************
* *
* INGRESE QUE TIPO DE USUARIO ES *
* *
* *
* (1) CLIENTE *
* *
* (2) EMPLEADO *
* *
* (3) GERENTE *
* *
* (4) SALIR *
* *
********************************************************
if opcion == 1:
print("USTED ES UN CLIENTE")
mostrar_productos()
elif opcion == 2:
print("USTED ES UN EMPLEADO")
elif opcion == 3:
clave = input(
"""
************************************************
* INGRESE LA CLAVE *
************************************************
: """)
if clave == claves[2]:
menu_gerente()
else:
print("SU CLAVE FUE INCORRECTA")
menu()
elif opcion == 4:
print("GRACIAS POR VISITAR")
else:
menu()
def mostrar_productos():
interfaz = """
********************************************************
* PRODUCTOS DISPONIBLES *
********************************************************
* PRODUCTO * PRECIO *
********************************************************
"""
posicion = """
{0} {1}"""
print(interfaz)
for producto in productos:
print(posicion.format(producto, str(productos[producto])))
def agregar_productos():
nombre_producto = input(
"""
***************************************************
* INGRESE EL NOMBRE DEL NUEVO PRODUCTO *
***************************************************
INGRESE EL NOMBRE DEL PRODUCTO: """)
precio_producto = eval(input(
"""
***************************************************
* INGRESE EL PRECIO DEL PRODUCTO *
***************************************************
INGRESE EL PRECIO DEL PRODUCTO: """))
productos[nombre_producto] = precio_producto
def eliminar_productos():
nombre_producto = input(
"""
***************************************************
* INGRESE EL NOMBRE DEL PRODUCTO ELIMINAR *
***************************************************
INGRESE EL NOMBRE DEL PRODUCTO: """)
productos.pop(nombre_producto)
def menu_gerente():
opcion = eval(input(
"""
********************************************************
* *
* USTED ES UN GERENTE *
* *
* *
* (1) MOSTRAR PRODUCTOS *
* *
* (2) AGREGAR PRODUCTOS *
* *
* (3) ACTUALIZAR PRODUCTOS *
* *
* (4) ELIMINAR PRODUCTOS *
* *
* (5) SALIR *
* *
********************************************************
if opcion == 1:
mostrar_productos()
menu_gerente()
elif opcion == 2:
agregar_productos()
menu_gerente()
elif opcion == 3:
pass
elif opcion == 4:
eliminar_productos()
menu_gerente()
elif opcion == 5:
pass
else:
print("INGRESO UNA OPCION NO VALIDA")
menu_gerente()
menu()