[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what calculator do you use?



On 14/07/2020 03:39, Wolf Halton wrote:
I know you are looking for a GUI calculator app, however I would like to entice you with a CLI app that is easy to use, but will make your coworkers think you are secretly a computer expert.
I tend to use python3 in the terminal window. I open a terminal, type python or python3 in the command line. It lets me do relatively complex calculations, and makes easy copy/paste of the entire calculation where required
I use powershell in Windows the same way. Can just use the up-arrow to repeat similar calculations.
Python is a programming language and it’s pretty simple to set up all kinds of repetitive math quite easily, but you probably won’t need all the capability (at least at first).
4/5 (enter) gets you 0 which is good for estimating
but 4.0/5 gets you 0.8 like you probably expect

"Floor division" is the default in Python 2 (without "from __future__ import division"), but in Python 3, "true division" is the default and there is a new "floor division" operator.

Python 2:

4 / 5 == 0
4.0 / 5 == 0.8

Python 3:

4 / 5 == 0.8
4 // 5 == 0

Project Jupyter <https://en.wikipedia.org/wiki/Project_Jupyter> provides a rich set of tools and supports Python.

Kind regards,

--
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand


Reply to: