Scientific-Calculator


  • Github URL: Project Link

  • This is a scientific calculator application built using Python's Tkinter library. It provides a modern interface and supports a wide range of mathematical operations, from basic arithmetic to advanced scientific calculations. This project was created as part of learning Python basics.


  • Tech Stack
    • Programming Language
    • Python: The main programming language used for the implementation.
    • GUI Framework
    • Tkinter: A built-in Python library for creating graphical user interfaces.
    • Libraries/Modules
    • math: For performing mathematical operations such as trigonometric functions, logarithms, and factorials.
      numpy (optional): While not explicitly utilized in this code, it's imported (likely for numerical operations if expanded).

  • Features
    • Basic Arithmetic Operations: Addition, subtraction, multiplication, division.
    • Advanced Mathematical Functions: Trigonometric functions, logarithms, exponentials, roots, powers.
    • Special Functions: Factorial, absolute value, percentage calculations.
    • Constants: Pi (π), Euler's number (e).
    • User-Friendly Interface: Modern design with a dark theme for enhanced readability.

    Below is an explanation of each function defined in the script and how to use them:

    • button_click(char): Appends the character char to the current input expression.
    • button_clear_all(): Clears the entire input expression.
    • button_delete(): Deletes the last character from the current input expression.
    • factorial(n): Recursively calculates the factorial of a non-negative integer n.
    • fact_func(): Calculates the factorial of the current input number.
    • Trigonometric Functions: trig_sin(), trig_cos(), trig_tan(), trig_cot() for sine, cosine, tangent, and cotangent respectively.
    • Root Functions: square_root(), third_root() for square root and cube root calculations.
    • sign_change(): Changes the sign of the current input number.
    • percent(): Calculates the percentage of the current input number.
    • button_equal(): Evaluates the current input expression and displays the result.