Average ->
Arg Input : Array | List,
    Price : < Arg > : < Float : +- >,
    Amount : < Arg > : < Integer >

Total_price, Total_amount = 0 ..

Do Total_price += Price( X ) * Amount( X ),
   Total_amount += Amount( X )
With X from Input

If Total_amount then
 Total_price / Total_amount
Else
 0
/
