{"id":19053358,"url":"https://github.com/georgiosioannoucoder/generate-and-test-prime","last_synced_at":"2025-07-23T18:34:25.730Z","repository":{"id":205017209,"uuid":"713209856","full_name":"GeorgiosIoannouCoder/generate-and-test-prime","owner":"GeorgiosIoannouCoder","description":"This is my solution to the generate-and-test-prime to find out if a number is prime or not. ➗","archived":false,"fork":false,"pushed_at":"2023-11-07T04:39:48.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T01:16:18.564Z","etag":null,"topics":["generate-and-test","prime-numbers"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeorgiosIoannouCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-02T03:49:22.000Z","updated_at":"2023-11-02T05:28:46.000Z","dependencies_parsed_at":"2023-11-07T06:05:18.295Z","dependency_job_id":null,"html_url":"https://github.com/GeorgiosIoannouCoder/generate-and-test-prime","commit_stats":null,"previous_names":["georgiosioannoucoder/generate-and-test-prime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GeorgiosIoannouCoder/generate-and-test-prime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiosIoannouCoder%2Fgenerate-and-test-prime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiosIoannouCoder%2Fgenerate-and-test-prime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiosIoannouCoder%2Fgenerate-and-test-prime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiosIoannouCoder%2Fgenerate-and-test-prime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeorgiosIoannouCoder","download_url":"https://codeload.github.com/GeorgiosIoannouCoder/generate-and-test-prime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiosIoannouCoder%2Fgenerate-and-test-prime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265120879,"owners_count":23714493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generate-and-test","prime-numbers"],"created_at":"2024-11-08T23:30:24.742Z","updated_at":"2025-07-13T09:34:52.485Z","avatar_url":"https://github.com/GeorgiosIoannouCoder.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n[![GitHub][github-shield]][github-url]\n\n# [Prime Number Checker] | Generate and Test Paradigm\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"prime_numbers.jpg\" alt=\"Logo\" width=\"200\" height=\"200\"\u003e\n\n\n\u003ch3 align=\"center\"\u003ePrime Number Checker\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Prime Number Checker allows people to check if a particular positive integer from 3 to 100 inlusive is a prime numbers by uing the Generate and Test Paradigm.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GeorgiosIoannouCoder/generate-and-test-prime\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#key-features\"\u003eKey Features\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#setup\"\u003eSetup\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## About The Project\n\n![Project Name Screen Shot][project-screenshot]\n\n- **Prime Number Checker allows people to check if a particular positive integer from 3 to 100 inlusive is a prime numbers by uing the Generate and Test Paradigm.**\n- **Suppose you must determine whether a given number between 3 and 100, inclusive, is a prime.**\n- **Recall that an integer N≥2 is prime if its only factors are 1 and itself.**\n- **So 17 and 23 are prime whereas 33 is not, because it is the product of 3 and 11.**\n- **Assume that you must solve this problem without benefit of a computer or pocket calculator.**\n- **Your first attempt at a solution, using the generate-and-test approach, might look like the following pseudocode:**\n\n```python:\n{While the problem is not yet solved and more possible factors for Number remain:\n\t[Generate a possible factor for Number\n\t/*possible factors will be generated in the\n\torder 2, 3, 4, 5, ...\n\tNumber*/\n\tTest: If (Number) / (possible factor) is an integer \u003e= 2 Then return not prime]\nEnd While}\nIf possible factor equals Number, Then return Number is prime\n```\n\n### Key Features\n\n1. **This prime number checker uses the generate and test paradigm.**\n2. **The \"generate and test\" paradigm is a problem-solving approach used in computer science, artificial intelligence, and engineering. It involves the following steps:**\n   1. ***Generate:*** **In this step, potential solutions are created or generated. This can involve coming up with various hypotheses, candidate solutions, or designs. In this case, generating possible factors.**\n\n   2. ***Test:*** **Each generated solution is tested or evaluated to determine its effectiveness, correctness, or suitability. The testing process often involves assessing how well the solution meets the desired criteria or objectives. In this case, we check if the generated possible factor divides the original number.**\n\n   3. ***Iterate:*** **Based on the test results, if a generated solution is not satisfactory, the process is repeated. New solutions are generated, tested, and the cycle continues until a satisfactory solution is found.**\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n### Built With\n\n[![Python][Python]][Python-url]\n[![JupyterNotebook][JupyterNotebook]][JupyterNotebook-url]\n\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n## Getting Started\n\n**To get a local copy of the Prime Number Checker up and running locally follow these simple example steps:**\n\n### Prerequisites\n\n**NOTE:** How to check if Python is installed and what is its version\n\n```sh\n  python --version\n```\n\n**NOTE:** How to check if Git is installed and what is its version\n\n```sh\n  git -v\n```\n\n1. Please make sure you have pyenv installed and use any Python3 version:\n\n   - You can use pyenv to switch between different Python versions:\n     - Windows: [https://www.youtube.com/watch?v=HTx18uyyHw8](https://github.com/pyenv-win/pyenv-win)\n     - Mac: [https://www.youtube.com/watch?v=31WU0Dhw4sk](https://github.com/pyenv/pyenv)\n     - Linux: [https://www.youtube.com/watch?v=1Zgo8M9yUtM](https://github.com/pyenv/pyenv)\n\n2. Please make sure you have git installed\n\n   - Windows: [https://git-scm.com/download/win](https://git-scm.com/download/win)\n   - Mac: [https://git-scm.com/download/mac](https://git-scm.com/download/mac)\n   - Linux: [https://git-scm.com/download/linux](https://git-scm.com/download/linux)\n\n### Setup\n\n1. Navigate to the directory where you want to clone/run/save the application\n\n   ```sh\n   cd your_selected_directory\n   ```\n\n2. Clone this repository\n\n   ```sh\n   git clone https://github.com/GeorgiosIoannouCoder/generate-and-test-prime.git\n   ```\n\n3. Navigate to the generate-and-test-prime git repository\n\n   ```sh\n   cd generate-and-test-prime\n   ```\n\n4. Use any Python3 version in the cloned repository folder:\n\n   ```sh\n   pyenv local 3.xx.xx\n   ```\n\n5. Create virtual environment in the cloned repository folder\n\n   ```sh\n   python -m venv .generate-and-test-prime-venv\n   ```\n\n6. Activate the virtual environment (Windows OR Mac/Linux):\n   1. Windows\n\n   ```sh\n   .\\.generate-and-test-prime-venv\\Scripts\\activate\n   ```\n\n   2. Mac/Linux\n\n   ```sh\n   source .generate-and-test-prime-venv/bin/activate\n   ```\n\n7. Install ipykernel:\n\n   ```sh\n   pip install ipykernel\n   ```\n\n8. Install Jupyter Notebook:\n\n   ```sh\n   pip install jupyter notebook\n   ```\n\n9.  Add the kernel of the virtual environment in the Jupyter Notebook:\n\n   ```sh\n   ipython kernel install --user --name=.generate-and-test-prime-venv\n   ```\n\n10. Run the Jupyter Notebook:\n\n   ```sh\n   jupyter notebook\n   ```\n\n11. Select the .generate-and-test-prime-venv kernel to run the Jupyter Notebook.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n## Usage\n\n1. Define the lower (inclusive) and upper (not inclusive) bounds of the for loop in the last cell to check all the prime numbers in that specificed range. The range is initailly as [3, 100].\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n## License\n\nDistributed under the MIT License. See [LICENSE](https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/blob/master/LICENSE) for more information.\n\nMIT License\n\nCopyright (c) 2023 Georgios Ioannou\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n## Contact\n\nGeorgios Ioannou - [@LinkedIn](https://linkedin.com/in/georgiosioannoucoder)\n\nGeorgios Ioannou - [@georgiosioannoucoder](https://georgiosioannoucoder.github.io/) - Please contact me via the form in my portfolio.\n\nProject Link: [https://github.com/GeorgiosIoannouCoder/generate-and-test-prime](https://github.com/GeorgiosIoannouCoder/generate-and-test-prime)\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eBack to top\u003c/a\u003e\u003c/p\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/GeorgiosIoannouCoder/generate-and-test-prime.svg?style=for-the-badge\n[contributors-url]: https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/GeorgiosIoannouCoder/generate-and-test-prime.svg?style=for-the-badge\n[forks-url]: https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/network/members\n[stars-shield]: https://img.shields.io/github/stars/GeorgiosIoannouCoder/generate-and-test-prime.svg?style=for-the-badge\n[stars-url]: https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/stargazers\n[issues-shield]: https://img.shields.io/github/issues/GeorgiosIoannouCoder/generate-and-test-prime.svg?style=for-the-badge\n[issues-url]: https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/issues\n[license-shield]: https://img.shields.io/github/license/GeorgiosIoannouCoder/generate-and-test-prime.svg?style=for-the-badge\n[license-url]: https://github.com/GeorgiosIoannouCoder/generate-and-test-prime/blob/main/LICENSE\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=0077B5\n[linkedin-url]: https://linkedin.com/in/georgiosioannoucoder\n[github-shield]: https://img.shields.io/badge/-GitHub-black.svg?style=for-the-badge\u0026logo=github\u0026colorB=000\n[github-url]: https://github.com/GeorgiosIoannouCoder/\n[project-screenshot]: prime_numbers.jpg\n[Python]: https://img.shields.io/badge/python-FFDE57?style=for-the-badge\u0026logo=python\u0026logoColor=4584B6\n[Python-url]: https://www.python.org/\n[JupyterNotebook]: https://img.shields.io/badge/jupyter-808080?style=for-the-badge\u0026logo=jupyter\u0026logoColor=FFA500\n[JupyterNotebook-url]: https://jupyter.org/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiosioannoucoder%2Fgenerate-and-test-prime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgiosioannoucoder%2Fgenerate-and-test-prime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiosioannoucoder%2Fgenerate-and-test-prime/lists"}