<prompt> Kujenga algorithm kwamba anapata idadi zote za kwanza hadi kiwango cha juu.Kiwango cha juu 20  <response>: One common algorithm to find prime numbers up to a given upper limit would be the Sieve of Eratosthenes. Heres how the algorithm for finding all prime numbers up to a given upper limit of 20 would look like:1. Create a list of integers from 2 to the maximum number upper limit, lets call it numbers 2, 3, 4, ..., 20.2. Create an empty list to store prime numbers, lets call it primes .3. Let p 2, the first prime number.4. Remove all multiples of p from the numbers list by iterating over the list and checking if a given number n in the list is divisible by p using the modulus operator n p 0. If it is, remove n from the numbers list. The resulting list now contains only numbers that are not divisible by p.5. Move p to the next number in the numbers list that is greater than the current value of p and repeat step 4.6. Continue repeating step 4 and 5 until the p is greater than the square root of the maximum number. At this point, all remaining numbers in the numbers list are necessarily prime, and we can add them to the primes list.7. Return the primes list.In Python, the implementation would look like this:pythondef find_primesupper_limit: numbers listrange2, upper_limit 1 primes p 2 while p upper_limit0.5: primes.appendp numbers n for n in numbers if n p ! 0 p numbers0 primes.extendnumbers return primesupper_limit 20result find_primesupper_limitprintresult 