Need tips in Global Variables Assignment in Python for assignment
<p>Need help with this assignment:</p>

<p>**Using four global variables</p>

<pre><code>foundCount  = 0
searchCount = 0
names = [ "Mary", "Liz", "Miles", "Bob", "Fred"]
numbers = [ 4, 17, 19]
def find(item):
    ....
def result():
    ....
</code></pre>

<p>Write code for the body of the two functions:</p>

<pre><code>find()
</code></pre>

<p>takes a single parameter which it looks up in the global list of names, and if it's not found there, then it looks in the list of numbers.</p>

<p>always increments searchCount, whether the item was found or not</p>

<p>if it finds the item, it increments the foundCount and prints "Found in Names" or "Found in Numbers" as appropriate.</p>

<p>displays "Not found" if it can't find the item</p>

<p>results()
this has no parameters. It prints a summary of the search counts:
e.g. "Total Searches: 6, Found items: 4, Not found: 2"**</p>

<p>Sample run</p>

<pre><code>**======= Loading Program =======
&gt;&gt;&gt; find("mary")
 Not found
&gt;&gt;&gt; find("Mary")
 Found in names
&gt;&gt;&gt; find(0)
 Not found
&gt;&gt;&gt; find(19)
 Found in numbers
&gt;&gt;&gt; results()
  ***** Search Results *****
 Total searches:  4
 Total matches :  2
 Total not found: 2**
</code></pre>

<p>What i have done so far is:</p>

<p>**</p>

<pre><code>foundCount  = 0
searchCount = 0
names = [ "Mary", "Liz", "Miles", "Bob", "Fred"]
numbers = [ 4, 17, 19]
def find(item):
    global foundcount
    if item == "Mary":
      printNow("Found in names")
    elif item == "Liz":
      printNow("Found in names")
    elif item == "Miles":
      printNow("Found in names")
    elif item == "Bob":
      printNow("Found in names")
    elif item == "Fred":
      printNow("Found in names")
    elif item == "4":
      printNow("Found in numbers")
    elif item == "17":
      printNow("Found in numbers")
    elif item == "19":
      printNow("Found in numbers")
    else: printNow("Not Found")

def result():
</code></pre>

<p>**</p>

<p>I need help with def result() function so i could finish this assignment and study for my maths exam in three days..
Need help in doing this assignment as it is due in tomorrow :(....</p>
