Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 21, 2020 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/b8163a56f181a402834f3ef7350ee4b4 to your computer and use it in GitHub Desktop.
Save parzibyte/b8163a56f181a402834f3ef7350ee4b4 to your computer and use it in GitHub Desktop.
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