On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz

> could you please share how you bypassed it?

On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz



On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com  wrote:
> On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang  wrote:
> > i have these task which i believe i have done well to some level
> > 
> > Create a function get_algorithm_result to implement the algorithm below
> > 
> > 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
> > 
> > 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
> > 
> > so i came up with this code below
> > 
> > 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 < 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) 
> > for the question above, there is a unittes which reads
> > 
> > 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")
> > but once i run my code ,it returns error saying Test Spec Failed
> > 
> > Your solution failed to pass all the tests
> > what is actually wrong with my code?
> 
> I had to use a hack to bypass it, worked and I moved on to next quiz

Could you please share how you bypassed it through hacking?


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to