Un Día en el Supermercado (algo de valor)


#1

no he logrado resolverlo.

precios = {
"banana": 4,
"manzana": 2,
"naranja": 1.5,
"pera": 3
}

inventario = {
"banana" : 6,
"manzana" : 0,
"naranja" : 32,
"pera" : 15
}
for key in precios:
print key
print "precio: %s" % precios[key]
print "inventario: %s" % inventario[key]

total = 0

for x in precios:
precios * inventario
total += precios * inventario
print total


#2
total += precios[x] * inventario[x]

#3

muchas gracias de nuevo bro. :sweat_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.