Fucntion programming
I have an issue with a script from the pro code coach Located at -> intermediate python -> functional programming -> generators The script question is as follows: The given code defines a function isPrime(x), which returns True if x is prime. You need to create a generator function primeGenerator(), that will take two numbers as arguments, and use the isPrime() function to output the prime numbers in the given range (between the two arguments). Sample Input: 10 20 Sample Output: [11, 13, 17, 19] My solution so far: def isPrime(x): if x < 2: return False elif x == 2: return True for n in range(2, x): if x % n ==0: return False return True def primeGenerator(a, b): #your code goes here values = [a,b] yield isPrime(values) f = int(input()) t = int(input()) print(list(primeGenerator(f, t))) I do however get these errors: Traceback (most recent call last): File "/usercode/file0.py", line 19, in <module> print(list(primeGenerator(f, t))) File "/usercode/file0.py", line 14, in primeGenerator yield isPrime(values) File "/usercode/file0.py", line 2, in isPrime if x < 2: TypeError: '<' not supported between instances of 'list' and 'int' What am I doing wrong with the generators