title: create two functions in python
body: <p>i have these task which i believe i have done well to some level</p>
  
  <p>Create a function get_algorithm_result to implement the algorithm below</p>
  
  <p>1- Get a list of numbers L1, L2, L3....LN as argument
     2- Assume L1 is the largest, Largest = L1
     3- Take next number Li from the list and do the following
     4- If Largest is less than Li
     5- Largest = Li
     6- If Li is last number from the list then
     7- return Largest and come out
     8- Else repeat same process starting from step 3</p>
  
  <p>Create a function prime_number that does the following
  Takes as parameter an integer and
  Returns boolean value true if the value is prime or
  Returns boolean value false if the value is not prime</p>
  
  <p>so i came up with this code below</p>
  
  <pre><code>def get_algorithm_result(my_list):
  if not any(not type(y) is int for y in my_list):
      largest = 0
      for item in range(0,len(my_list)):
          if largest &lt; my_list[item]:
              largest = my_list[item]
      return largest
  else:
  
      return(my_list[-1])
  
  def prime_number(integer):
  if integer%2==0 and 2!=integer:
      return False
  else:
      return True
  
  get_algorithm_result([1, 78, 34, 12, 10, 3])     
  get_algorithm_result(["apples", "oranges", "mangoes", "banana", "zoo"]) 
  prime_number(1) 
  prime_number(78) 
  prime_number(11) 
  </code></pre>
  
  <p>for the question above, there is a unittes which reads</p>
  
  <pre><code>import unittest
  
  class AlgorithmTestCases(unittest.TestCase):
    def test_maximum_number_one(self):
      result = get_algorithm_result([1, 78, 34, 12, 10, 3])
      self.assertEqual(result, 78, msg="Incorrect number")
  
    def test_maximum_number_two(self):
      result = get_algorithm_result(["apples", "oranges", "mangoes", "banana", "zoo"])
  self.assertEqual(result, "zoo", msg="Incorrect number")
  
    def test_prime_number_one(self):
      result = prime_number(1)
      self.assertEqual(result, True, msg="Result is invalid")
  
    def test_prime_number_two(self):
      result = prime_number(78)
      self.assertEqual(result, False, msg="Result is invalid")
  
    def test_prime_number_three(self):
      result = prime_number(11)
      self.assertEqual(result, True, msg="Result is invalid")
  </code></pre>
  
  <p>but once i run my code ,it returns error saying 
      Test Spec Failed</p>
  
  <pre><code>Your solution failed to pass all the tests
  </code></pre>
  
  <p>what is actually wrong with my code?</p>