{"id":24316068,"url":"https://github.com/venkat-0706/number-guessing-game---python","last_synced_at":"2025-04-13T05:26:24.415Z","repository":{"id":253571074,"uuid":"843898384","full_name":"venkat-0706/Number-Guessing-Game---Python","owner":"venkat-0706","description":"Python number guessing game: Computer picks a random number, user tries to guess it. Computer gives hints (too high/low). Repeat until correct. Add difficulty levels, limited tries, or scoring for more challenge.","archived":false,"fork":false,"pushed_at":"2024-08-17T19:06:27.000Z","size":8,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T22:11:13.360Z","etag":null,"topics":["algorithm-design","basic-python-project","conditional-statements","data-validation","error-handling","game-development","logic-programming","loops","python-programming","random-number-generator","user-input-handling"],"latest_commit_sha":null,"homepage":"","language":"Python","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/venkat-0706.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":"2024-08-17T18:50:28.000Z","updated_at":"2025-03-08T06:54:39.000Z","dependencies_parsed_at":"2024-08-17T20:07:34.515Z","dependency_job_id":null,"html_url":"https://github.com/venkat-0706/Number-Guessing-Game---Python","commit_stats":null,"previous_names":["venkat-0706/number-guessing-game---python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FNumber-Guessing-Game---Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FNumber-Guessing-Game---Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FNumber-Guessing-Game---Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FNumber-Guessing-Game---Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkat-0706","download_url":"https://codeload.github.com/venkat-0706/Number-Guessing-Game---Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248667226,"owners_count":21142394,"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":["algorithm-design","basic-python-project","conditional-statements","data-validation","error-handling","game-development","logic-programming","loops","python-programming","random-number-generator","user-input-handling"],"created_at":"2025-01-17T12:17:58.855Z","updated_at":"2025-04-13T05:26:24.381Z","avatar_url":"https://github.com/venkat-0706.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Number Guessing Game in Python\n\n### Project Objectives\n\nThis project aims to:\n\n* Implement a classic number guessing game in Python.\n* Practice fundamental programming concepts like random number generation, user input, conditional statements, and loops.\n* Create a user-friendly and interactive experience.\n\n### What I Learned\n\nDeveloping this game helped me solidify my understanding of:\n\n* The `random` module for generating random numbers.\n* Working with user input and converting it to the desired data type (integer in this case).\n* Utilizing conditional statements (`if`, `elif`, `else`) for decision making.\n* Implementing loops (`while`) for repetitive tasks.\n* Displaying formatted output using `print` statements.\n\n### Project Purpose\n\nThis number guessing game serves as a:\n\n* **Learning tool:** It reinforces core Python programming concepts in a practical and engaging way.\n* **Simple entertainment:** It provides a casual game experience for users to test their luck and intuition.\n\n### How it Works\n\n1. The program imports the `random` module.\n2. It defines a function `main()` to encapsulate the game logic.\n3. Inside `main()`:\n    * Counters are initialized for high guesses, low guesses, and wins.\n    * A random number between 1 and 100 is generated and stored.\n    * A `while` loop continues until the player guesses correctly.\n        * Inside the loop, the user is prompted to enter a guess.\n        * The guess is compared to the secret number.\n        * Based on the comparison (too high, too low, or correct), appropriate messages are displayed, and counters are updated.\n    * After the loop, the total number of high, low, and overall guesses is displayed.\n4. The `main` function is called to start the game.\n\n### Efficiency\n\nThis implementation prioritizes readability and understanding over optimization. While the code is efficient for a simple game, more complex projects might require techniques to improve performance for larger data sets or frequent calculations. \n\n### Further Development\n\n* Difficulty levels with adjustable number ranges.\n* Limited number of attempts to add an element of challenge.\n* Score tracking based on the number of guesses.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenkat-0706%2Fnumber-guessing-game---python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenkat-0706%2Fnumber-guessing-game---python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenkat-0706%2Fnumber-guessing-game---python/lists"}