scalar product exercises