{"id":25397372,"url":"https://github.com/notabhaykumar/scientific-calculator","last_synced_at":"2025-04-11T02:44:57.549Z","repository":{"id":249684975,"uuid":"832234313","full_name":"NotAbhayKumar/scientific-calculator","owner":"NotAbhayKumar","description":"A feature-rich scientific calculator built with Python and Tkinter. Supports basic arithmetic operations, trigonometric functions, logarithms, and constants like pi and Euler's number. Easy to use with a clean and intuitive interface.","archived":false,"fork":false,"pushed_at":"2024-07-22T15:55:58.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-22T19:11:24.871Z","etag":null,"topics":["calculator","python","tkinter"],"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/NotAbhayKumar.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-07-22T15:35:40.000Z","updated_at":"2024-07-22T19:11:29.057Z","dependencies_parsed_at":"2024-07-22T19:11:28.122Z","dependency_job_id":"229a0032-f73f-4854-9a65-13b55cc53357","html_url":"https://github.com/NotAbhayKumar/scientific-calculator","commit_stats":null,"previous_names":["notabhaykumar/scientific-calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAbhayKumar%2Fscientific-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAbhayKumar%2Fscientific-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAbhayKumar%2Fscientific-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAbhayKumar%2Fscientific-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotAbhayKumar","download_url":"https://codeload.github.com/NotAbhayKumar/scientific-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239060456,"owners_count":19574970,"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":["calculator","python","tkinter"],"created_at":"2025-02-15T21:47:44.122Z","updated_at":"2025-02-15T21:47:44.809Z","avatar_url":"https://github.com/NotAbhayKumar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scientific Calculator\n\nThis is a simple scientific calculator built using Python's Tkinter library. It supports basic arithmetic operations as well as some advanced mathematical functions like trigonometric calculations, logarithms, and more.\n\n## Features\n\n- **Basic Arithmetic Operations**: Addition, subtraction, multiplication, and division.\n- **Advanced Mathematical Functions**: \n  - Sine, cosine, tangent\n  - Square root\n  - Natural logarithm\n  - Logarithm base 10\n  - Pi (π)\n  - Euler's number (e)\n- **Clear Button**: Resets the calculation.\n- **Backspace Button**: Deletes the last character.\n- **Decimal Point Support**: Allows for decimal calculations.\n\n## Installation\n\nTo get started with the scientific calculator, follow these steps:\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/NotAbhayKumar/scientific-calculator.git\n\n2. **Navigate to the Project Directory**:\n   ```bash\n   cd scientific-calculator\n\n4. **Ensure You Have Python Installed**:\n   This project requires Python 3.6 or later.\n\n## Usage\n\nTo run the calculator, execute the following command in your terminal:\n\n```python calculator.py```\n\nThe calculator window will appear, and you can start performing calculations.\n\n## Code Overview\n\nThe main logic of the calculator is contained within the ScientificCalculator class in the `calculator.py` file. Below is a brief overview of the code structure:\n\n## ScientificCalculator Class\n\n**Initialization (__init__)**:\n\n1. Sets up the main window, entry widget, and buttons.\n2. Configures the grid layout for the buttons.\n   \n**Button Creation**:\n1. Buttons are created dynamically from a list of tuples, where each tuple contains the button text and its color.\n   \n**Button Click Handling (on_button_click)**:\n\n1. Evaluates expressions.\n2. Handles special buttons like clear, backspace, pi, and Euler's number.\n3. Appends text to the equation displayed in the entry widget.\n## Main Function\nInitializes the Tkinter root and creates an instance of the ScientificCalculator class.\nStarts the Tkinter event loop to display the calculator window.\n\n**Example**\n\nHere is a snippet of how to import the necessary libraries:\n\n```python\nimport tkinter as tk\nimport math\n\n# Rest of the code... \n```\nFor a complete implementation, see the calculator.py file.\n\n## Contributing\n\nContributions are welcome! If you find any bugs or have suggestions for improvements, please create an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contact\n\nIf you have any questions or feedback, feel free to reach out:\nEmail: mr.abhaykumar@outlook.com\nGitHub: NotAbhayKumar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotabhaykumar%2Fscientific-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotabhaykumar%2Fscientific-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotabhaykumar%2Fscientific-calculator/lists"}