This Python program helps you determine whether numbers in a given range are Prime or Composite. It also counts the total number of prime and composite numbers in the range.
- Prime numbers: Numbers greater than 1 that can only be divided by 1 and themselves.
- Composite numbers: Numbers that have divisors other than 1 and themselves.
Enter starting number: 1
Enter finishing number: 10
1 is neither prime nor composite
2 is prime
3 is prime
4 is composite
...
Count: 4 Prime and 5 Composite numbers in the range.
- Input validation for natural numbers (only positive integers).
- Ensures that the starting number is less than or equal to the ending number.
Python 3.x