Answer:
See the explanation below.
Explanation:
In the beginning, we use the modulus operator i.e. %, to check whether a number is even. If a number is fully divided by 2 without giving a remainder, it is an even number. A working code is given below in the attachment.
For larger numbers we use faster algorithm techniques. Read more about an interesting algorithm to find prime numbers, named, sieve of eratosthenes method by visiting: cutt.ly/rgc4dmr
To run a code online, my favorite IDE is repl.it
Visit: repl.it/languages/python3
to run a sample code now without installation setups.
Best Regards!