{"id":18054014,"url":"https://github.com/anurag1101/match_case","last_synced_at":"2025-04-05T08:22:24.359Z","repository":{"id":259745491,"uuid":"879333452","full_name":"Anurag1101/Match_Case","owner":"Anurag1101","description":"\"Python program demonstrating match-case usage for day selection. Prompts users to enter a number (1-7) and outputs the corresponding day, with input validation and error handling for non-integer and out-of-range inputs.\"","archived":false,"fork":false,"pushed_at":"2025-01-23T13:33:39.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T15:51:00.044Z","etag":null,"topics":["days-of-week","match-case","python","python-3","python3","switch-case"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anurag1101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-27T16:25:09.000Z","updated_at":"2025-01-23T13:33:44.000Z","dependencies_parsed_at":"2025-01-20T05:30:26.841Z","dependency_job_id":"f431f6b5-116e-4c38-86da-2dd1939b99f3","html_url":"https://github.com/Anurag1101/Match_Case","commit_stats":null,"previous_names":["anurag1101/match_case"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FMatch_Case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FMatch_Case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FMatch_Case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FMatch_Case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anurag1101","download_url":"https://codeload.github.com/Anurag1101/Match_Case/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247307425,"owners_count":20917467,"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":["days-of-week","match-case","python","python-3","python3","switch-case"],"created_at":"2024-10-31T00:08:48.715Z","updated_at":"2025-04-05T08:22:24.320Z","avatar_url":"https://github.com/Anurag1101.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Day of the Week Program with Match-Case and Input Validation\n\nThis Python script prompts the user to enter a number between 1 and 7, using the `match-case` statement (similar to a switch-case) to display the corresponding day of the week. It includes input validation to handle incorrect or out-of-range inputs, providing a user-friendly experience.\n\n## Features\n- **Match-Case Logic**: Implements Python's `match-case` structure to map numbers to days.\n- **Input Validation**: Ensures user input is an integer within the specified range (1-7).\n- **Error Handling**: Provides meaningful error messages for out-of-range or non-integer inputs.\n\n## How to Use\n1. Run the script.\n2. Enter a number between 1 and 7 when prompted:\n   - `1` -\u003e Monday\n   - `2` -\u003e Tuesday\n   - `3` -\u003e Wednesday\n   - `4` -\u003e Thursday\n   - `5` -\u003e Friday\n   - `6` -\u003e Saturday\n   - `7` -\u003e Sunday\n3. If the input is valid, the program outputs the corresponding day of the week.\n4. If the input is out of range, an error message will prompt you to enter a number between 1 and 7.\n5. If the input is not an integer, an error message will prompt you to enter a valid integer.\n\n## Example Output\n\n### Valid Input\nEnter a number between 1 and 7: 3\n\nWednesday\n\n\n### Out-of-Range Input\n\nEnter a number between 1 and 7: 10\n\nError: Please enter a number between 1 and 7.\n\n### Non-Integer Input\n\nEnter a number between 1 and 7: hello\n\nError: Invalid input. Please enter an integer.\n\n### Requirements\n\nPython 3.10+ (for match-case syntax)\n\n### License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fmatch_case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanurag1101%2Fmatch_case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fmatch_case/lists"}