I cant get this to work... Ive been at this for hrs n n idk y its not working...
#function takes in two integers and return a list of prime numbers between those two integers def list_of_primes(intlow,inthigh): plist=[] for i in range(intlow,inthigh+1): prime=True for j in range(2,i): if i%j==0: prime=False if prime==True: plist.append(i) return plist #use input to get lower and higher integers from the user #call the function list_of_primes using the user values for the lower and higher integers and save the result to a variable called primelist #print primelist #print the first 4 elements of primelist (if there are fewer than four elements it should display the entire list) #using a for loop calculate the sum of the elements of primelist, print that sum