{"id":26359260,"url":"https://github.com/hasderhi/tkinter-calculator","last_synced_at":"2025-03-16T15:59:08.930Z","repository":{"id":259067084,"uuid":"868379730","full_name":"hasderhi/tkinter-calculator","owner":"hasderhi","description":"A showcase of tkinter's capabilities: a small program for a simple calculator written with python using the tkinter modules.","archived":false,"fork":false,"pushed_at":"2024-10-21T16:23:54.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-22T04:40:26.213Z","etag":null,"topics":[],"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/hasderhi.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-10-06T08:27:38.000Z","updated_at":"2024-10-21T16:23:58.000Z","dependencies_parsed_at":"2024-10-22T08:53:22.961Z","dependency_job_id":null,"html_url":"https://github.com/hasderhi/tkinter-calculator","commit_stats":null,"previous_names":["hasderhi/tkinter-calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasderhi%2Ftkinter-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasderhi%2Ftkinter-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasderhi%2Ftkinter-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasderhi%2Ftkinter-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasderhi","download_url":"https://codeload.github.com/hasderhi/tkinter-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893843,"owners_count":20364916,"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":[],"created_at":"2025-03-16T15:59:08.078Z","updated_at":"2025-03-16T15:59:08.905Z","avatar_url":"https://github.com/hasderhi.png","language":"Python","readme":"# Calculator GUI with Tkinter\n\nThis is a simple calculator GUI application built using Python's Tkinter library. The calculator allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.\n\n\n# How it Works\n\n## User Interface:\n\nThe calculator GUI consists of a display area at the top and a numpad with buttons for digits 0-9, basic arithmetic operators (+, -, *, /), and a few special buttons (DEL, AC, =). The user can interact with the calculator by clicking on these buttons.\n\n\n## Equation Array:\n\nThe calculator uses an equation array to store the user's input. Each time a button is clicked, the corresponding value is appended to the equation array. The array is then used to evaluate the expression when the \"=\" button is clicked.\n\n\n# Functions:\n\nThe calculator has several functions that work together to provide the desired functionality:\n#### *createEquation(num):* Appends the input value to the equation array and updates the display.\n#### *backspace():* Deletes the last entry in the equation array and updates the display.\n\n#### *clear():* Clears the entire equation array and resets the display.\n#### calculate():* Evaluates the expression in the equation array and updates the display with the result.\n\n\n## Error Handling:\n\nThe calculator includes basic error handling to handle cases such as:\n\nDivision by zero\nInvalid input (e.g., trying to calculate an empty equation)\nErrors during calculation (e.g., syntax errors)\nIn such cases, the calculator displays an error message and resets the display.\n\n# Running the Calculator\n\n\nTo run the calculator, simply execute the *calculator.py*, which initializes the GUI and starts the main event loop.\n\n\n# License\n\nThis software is released under the MIT license. See the LICENSE file for details.\n\n# Author\n\nTobias Kisling (Github: https://github.com/hasderhi)\n\n# Version\n\n1.0\n\n# Dependencies\n\n\nPython 3.x;\n---\nTkinter library (included with Python)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasderhi%2Ftkinter-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasderhi%2Ftkinter-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasderhi%2Ftkinter-calculator/lists"}