Python Shell as Calculator
In my day-to-day laptop use, I often need a tool to perform calculations. On Linux, there are several calculator tool options, such as Mate Calculator (mate-calc), which is the default application for the Mate desktop environment, or KCalc, which is available in KDE. However, I often prefer to use another alternative: the Python shell or Python REPL for performing simple calculations.
To run the Python shell, you can open a terminal and type the command python3. Through the Python shell, you can perform basic operations such as addition, subtraction, division, and multiplication.
![]() |
aritmatika sederhana menggunakan python shell / python REPL |
In addition to simple arithmetic operations, the Python shell can also be used for trigonometric, exponential, and logarithmic calculations, as well as basic statistics—by first importing the necessary libraries.
A more detailed reference on using the Python shell as a calculator can be found at the following link: https://problemsolvingwithpython.com/03-The-Python-REPL/03.01-Python-as-a-Calculator/
Comments
Post a Comment