title: Find if there is a connection between two places and calculate cost
body: <p>i have connections between cities like </p>
  
  <pre><code>connection(London,Sziget).
  connection(Sziget,Kairo).
  </code></pre>
  
  <p>so i want to create a predicate to find if there is a possible route between two cities even passing through other cities first. </p>
  
  <pre><code>Input example: route(London,Kairo).
         result: true
  </code></pre>
  
  <p>Up to this point i have created this recursive code that works.</p>
  
  <pre><code>route(W,Z):-connection(W,Z).
  route(W,Z):-connection(W,Y),route(Y,Z).
  </code></pre>
  
  <p>But i also want to calculate the total cost of the route if the cost between two cities is 100 and for every other city passing is 50 more.</p>
  
  <pre><code>Input example: route(London,Kairo).
         result: true 150
  </code></pre>
  
  <p>Any help appreciated.</p>