Hello friends...
Today's program:
WAP to find whether the given
number is prime or not???
this can be done in three ways:
1. Loop from 1 to n
2. Loop from 1 to n/2
3. Loop from 1 to square root of n
**THIS IS THE THIRD METHOD**
The time taken to execute the code is "0.015 seconds"
1st method-7.65625 seconds
2nd method-3.7968 seconds
3rd method-0.015 seconds
Link for 1st method:
• Python Project #2-Prime number method #1
Link for 2nd method:
• Python Project #2-Prime Number method #2
The code snippet can be found in the GitHub repository.
Link is:
https://github.com/avinash90000/Prime...
For further updates stay tuned.
If you have any doubts regarding python comment below.
We will make a video about it.
Subscribe for more content...