Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 5
You can find out if a number is prime by checking if it's divisible by any number smaller than that number > 1. If it is, it's not prime.
You can code that with a loop and modulo. And you can put it into a function, so that you can call it for the numbers 1 to 100, in yet another loop.
That will not yet be optimal, but okay easy to pull off for a beginner.