Generators Finding prime numbers is a common coding interview task. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 3
Attempts?
24th Sep 2023, 3:43 PM
A͢J
A͢J - avatar