<p><br>
On 12 Feb 2012 00:29, &quot;amt&quot; &lt;<a href="mailto:0101amt@gmail.com">0101amt@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello! I&#39;m currently stuck at the Extra Credit 3 from LPTHW.<br>
&gt;<br>
&gt; Link to the actual exercise:<a href="http://learnpythonthehardway.org/book/ex19.html">http://learnpythonthehardway.org/book/ex19.html</a><br>
&gt; The exercise:<br>
&gt; Write at least one more function of your own design, and run it 10<br>
&gt; different ways.<br>
&gt;<br>
&gt;<br>
&gt; Code from the book:<br>
&gt; def cheese_and_crackers(cheese_count, boxes_of_crackers):<br>
&gt;    print &quot;You have %d cheeses!&quot; % cheese_count<br>
&gt;    print &quot;You have %d boxes of crackers!&quot; % boxes_of_crackers<br>
&gt;    print &quot;Man that&#39;s enough for a party!&quot;<br>
&gt;    print &quot;Get a blanket.\n&quot;<br>
&gt;<br>
&gt;<br>
&gt; print &quot;We can just give the function numbers directly:&quot;<br>
&gt; cheese_and_crackers(20, 30)</p>
<p>&gt; I wrote a function similar to cheese_and_crackers and it works just<br>
&gt; fine but I can&#39;t figure out more ways of calling a function other than<br>
&gt; the ones presented in the code(with integers as arguments,variables as<br>
&gt; arguments, two integer additions as arguments and with arguments in<br>
&gt; the form of variable+integer). The author states that there are 10<br>
&gt; different ways to run it.(in a comment he states that: &quot;You can run it<br>
&gt; a lot of different ways, far too many to enumerate.).<br>
&gt;<br>
&gt;<br>
&gt; So, what other ways are there aside the ones already presented in the<br>
&gt; above code?<br>
&gt;<br>
&gt;</p>
<p>Hi,</p>
<p>Subject to the same caveats as your other replies:</p>
<p>How about</p>
<p>for (cheesecount, crackercount) in [(3,5), (7,42)]:<br>
    cheese_and_crackers(cheesecount, crackercount)</p>
<p>Best,</p>
<p>Brian vdB</p>