A simple python calculator able to memorize and operate with scalars, vectors and matrices.
- Python >=3.9
- Run from source: Python calculator.py
It performs a simple memory system storing global variables with variables names and values.
Any input to memorize variables is in the form: variable_name = variable_value
- variable_name can be any string and must be before = sign
- variable_value can be:
- scalar with integer or float syntax 0,1,2,-1,-2,0.1,-0.1,...
e.g.
x=1
y=2.5
z=3.1416 - vector with syntax (scalar1,scalar2,scalar3,...)
where , delimitator is used to separate vector elements.
e.g.
v=(1,2,3)
w=(1.5,2.5,3.5,0.1) - matrix with syntax (scalar11,scalar12,...;scalar21,scalar22;...)
where , delimitator is used to separate matrix elements on same row
and ; delimitator is used to separate each rows
e.g.
m=(1,2,3;4,5,6;7,8,9)
- scalar with integer or float syntax 0,1,2,-1,-2,0.1,-0.1,...
Enter 'calc' to be able to sum, subtract, multiply scalars, vectors and matrices
or divide scalars.
Entering 'h' will give a set of auxiliary basic features and commands.
Please report any bug at [email protected]