# puzzle gauntlet advanced

The Prime Guest List

The mathematician's party invites ONLY primes. Write out the guest list up to n. πŸŽ“

You get n. Print every prime from 2 to n, space-separated (or none if n is below 2). You just built a prime detector β€” promote it to a function and let it work.

Example:

Input: n = 20 Output: 2 3 5 7 11 13 17 19

Testing every number from 2 to 20 with the prime detector keeps only the ones with no smaller divisor.

πŸ’‘ need a hint?

pg-prime-guest-list.pyπŸ”’ given lines are locked β€” write your code in between
loading...