Python 3: Theoretical question about the use of variables in functions : <p>I have a theoretical question about Python 3.0 based on the example below:</p>

<pre><code>def bookstore(book,price):
    return ("book Type: "+ book.capitalize() + " costs $" + price)

book_entry=input('Enter book type: ')
price_entry=input('Enter book type price: ')

print (bookstore(book_entry,price_entry))
</code></pre>

<p>By accident I got this script working, but I don't fully understand WHY it need to be done this way.
It is about the following part: </p>

<pre><code>def bookstore(book,price):       AND       print (bookstore(book_entry,price_entry))
</code></pre>

<ol>
<li><p>Why should the variables [<em>book_entry &amp; price_entry</em>] be entered in the print-funtion instead of in the definition-function [<em>book,price</em>]?  </p></li>
<li><p>How is communication possible between the variables? The def function is the only connection, but the variable name are different, how can the code accept this difference without giving an error? </p></li>
</ol>
