-
-
Save parzibyte/b8163a56f181a402834f3ef7350ee4b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nombre_articulo = input("Nombre del artículo que se vende: ") | |
if nombre_articulo in nombres: | |
cantidad = float(input("Cantidad vendida: ")) | |
indice = nombres.index(nombre_articulo) | |
precio = precios[indice] | |
cantidades_vendidas[indice] += cantidad | |
print( | |
f"Se vende(n) {cantidad} {nombre_articulo}. Total: {cantidad * precio}") | |
else: | |
print("El artículo no existe") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment