0

Generators Finding prime numbers is a common coding interview task.

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]

24th Sep 2023, 3:29 PM
Warsame Said
Warsame Said - avatar
1 Antwort
+ 3
Attempts?
24th Sep 2023, 3:43 PM
A͢J
A͢J - avatar