Implement Robust Prime Number Checker Function #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement Robust Prime Number Checker Function
Description
Task
Implement Prime Number Checker
Acceptance Criteria
Summary of Work
Prime Number Checker Implementation
Changes Made
src/prime_checker.pywith a comprehensiveis_prime()functiontests/test_prime_checker.pyImplementation Details
Function:
is_prime(number)Key Features
Input Validation
TypeErrorfor non-integer inputsFalsefor numbers <= 1Algorithmic Approach
Test Coverage
Acceptance Criteria
✓ Correctly identifies prime numbers
✓ Handles edge cases (0, 1, negative numbers)
✓ Provides clear error handling
✓ Implements efficient primality checking
✓ Comprehensive test suite
Notes
Changes Made
Tests
Signatures
Staking Key
AEghvdqmRtc3fjKXfNTMJJ6WshksgWuJ9YBExgsZu8cN: 3PzheUQPqMqBndpY6xY2fHsiLz8Y3yDBcLDMWTMLRwYjqJRxjnxX3u9HXBcvubEeXJ7WF2DF7X9Es77fHEGp8R6gcquYS3HRXVvjioeUTtb9PwTGma5ef96JaWEJVZZEERzQEJZHs6B2RkCmA3AMJFWfaJ62EdG8ygrVFc3Znkd4kbRbn8rCpN26K4oJ7NS3dDUg299M7WmXDu895xyHhxK644yTHLvvaWsuFf79nuZrYZ6dLbCpecWQGj8GgLq9wdkPyrgwsZonydNK7c5ehdXoSLtKoKnHRQycC9ExUwP3biccagz3ov5wWSnXsnrkktwNBXLZo5QWgnfnups1tyQmQy6FGxBgVXQ9wNRCauDmb7YYCGiLcB4PqXkpJohw6pPEXXpZbgnd2xG7kShYkPYCSAbQxrRcigWQ
Public Key
AwXAtX7tMhL4JyB8NfXdsrqc1UifaMyap3c9bpN9RMse: 2ofyVjS6dSwt9Skys4S3JgS9Ptu6n4bFVr2zFj1MeymHW5G6apTzzDvAyPQMmRgyXtbfmfAqHAoB3JUvVwwP8maMNRWjLHSKsCyuWwqW8AkahthCtwhK1RDe1Lfq3P1gG3YZYBZaoNxHjRYPaRKgD7fJSTCEE2dTCifta1YQri948VbY6xVRXfDUxQVqhGdbvxfMRsNLZD8GQeJJhTGpk9e6kbosPD69pTXviu8VvDdkMBVQLVkyECwwAkd7BcGraWaDJdCsSuZJ1oewMUPQmyVqjQMjdneCcaLbWUBhDgDT5cWK23mPi3zqeo9UFXWsHykx1eMUikWotpCAAqmAVHzkWKTXXirHoURwuz8WsYyCCCSmu5z18XP1kvAL84TDaXAfjRXTsRjpxLeZhyQhpA8Q3wAhxYWbwP32