Kindly help me execute this syntax
The questions says
Create a function get_algorithm_result to implement the algorithm below

Get a list of numbers L1, L2, L3…LN as argument Assume L1 is the largest, Largest = L1 Take next number Li from the list and do the following If Largest is less than Li Largest = Li If Li is last number from the list then return Largest and come out 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

but this is what i have written so far

def get_algorithm_result(numList):
numblist = range(10)
for i in numList:
if L1 < Li:
print (Largest = Li)
elif Li is LN:
return "Largest"
continue

def myFunc( param1, param2):
# Begin of =myFunc= FUNCTION-BODY
# this =myFunc= function- has 2 PARAMETERS param1 and param2
# param1 and param2 PARAMETERS are used
# as -local- VARIABLES throughout the =myFunc= FUNCTION-BODY
print( param1 + " and " + param2 )
#End of =myFunc= FUNCTION-BODY

If you want to call/execute the myFunc function
you will have to add a pair of parentheses to myFunc
like myFunc()
As the myFunc function was defined
as having 2 parameters
you have to provide 2 arguments
in our case 2 string VALUES “Alena” and “Lauren”
like myFunc(“Alena”,“Lauren”)

some quotes from the outer-world:

argument is the value/variable/reference being passed in,
parameter is the receiving variable used within the function/block

OR

"parameters" are called “formal parameters”,
while “arguments” are called “actual parameters”.

#Create a function get_algorithm_result
# def get_algorithm_result()
#to implement the algorithm below
#Get a list of numbers L1, L2, L3....LN as argument
#the function takes a PARAMETER numlist
def get_algorithm_result(num_list):
#Assume L1 is the largest,
largest = 0
# Largest = L1
for item in range(0,len(num_list)):
#Take next number Li from the list
# num_list[item]
#and do the following
#If Largest is less than Li
if largest < num_list[item]:
#Largest = Li
largest = num_list[item]
#end of FOR-loop
#If Li is last number from the list
#then return Largest
#using the return statement
# will cause you to leave this function
return largest
#and come out
#
#== i assume that the following
#== is part of an other Instruction-set....
#Else repeat same process starting from step 3
print( get_algorithm_result([4,7,1,9,12,2,1]) )
#Create a function prime_number that does the following
# def prime_number()
#Takes as parameter an integer
def prime_number(integer):
#and
#Returns boolean value true if the value is prime
#or
#Returns boolean value false if the value is not prime
if integer%2==0 and 2!=integer:
return False
else:
return True
print( prime_number(6) )
print( prime_number(5) )

Well Li does probably mean current ListIndex so instead of using Li you might use your couting variable i that goes through your list. Also where does this come from and what does it have to do with your function?

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

this will work fine
def get_algorithm_result(n):
if type(n) == type():
largest = n[0]
for item in n:
if largest < item:
largest = item
return max(n)
else:
pass
return largest

def prime_number(integer):
if integer%2==0 and 2!=integer:
return False
else:
return True

def recursive_factorial (n):
if n == 0:
return 1
else:
return n *recursive_factorial(n-1)
def iterative_factorial (n):
result = 1
for i in range(1,n+1):
result *= i
return result
expectation = true
this was the 0ne i did but it keeps on showing this error maximum recursion depth exceded is the code wrong
pls help me review it if there is any error there

hi bro!
I believe you have done Quiz 5 (Algo Lab). please help a brother here o, i have tried different method to write the code even when the test certify it…Ok, it still complains about spec

`def get_algorithm_result(n):
if type(n) == type():
largest = n[0]
for item in n:
if largest < item:
largest = item
return max(n)
else:
pass
return largest

def prime_number(integer):
if integer%3==0 and3!=integer:
return False
else:
return True
this is the answer and aiso indent it

Hi @designninja41379 did you ever get a “An error occurred running your script” when answering questions in the ALGO LAB?

this is my code and i keep getting that error message.

def get_algorithm_result(num_list):
if type(num_list) == type() and num_list != :
largest = num_list[0]
n = 0
while (n+1) < len(num_list):
if largest < num_list[n+1]:
largest = num_list[n+1]
n = n + 1
return largest
else:
pass

def get_algorithm_result(n):
if type(n) == type():
largest = n[0]
for item in n:
if largest < item:
largest = item
return max(n)
else:
pass
return largest

def prime_number(integer):
if integer%3==0 and3!=integer:
return False
else:
return True

the above code didnt work for me and i am stuck
is there anything i’m missing?
please help me. My deadline is in 2 days