PyCalc Help
Quick Start
This quick start guide will familiarize you with the basic features of the PyCalc interface. For more detailed help, see individual sections in the menu.
Intro
The main PyCalc interface looks like this:
To calculate, enter mathematical expressions into the entry box using the keyboard. The entry box is located just above the keyboard, or at the bottom of the screen if the keyboard is hidden (outlined in orange below).
Most of the time, PyCalc can display the result of your calculation immediately, even as you type:
Expressions
Expressions may be simple or complex, and can even be arbitrary Python code. PyCalc uses the basic math operators:
Addition | |
Subtraction | |
Multiplication | |
Division | |
Exponentiation (powers) |
Functions
For more complicated math operations, you use functions. Functions are used by typing their name with one or more values in parentheses, like
for square root of 16. Or
for cosine of pi/4
. Note that you can use pi
or e
for those common mathematical constants.
For functions that take more than one value, separate the values with commas: min(2, 5)
.
See the list of the many functions available. You can even define your own functions.
These simple building blocks can be combined to form more complicated expressions. Use parentheses to group sub-expressions together in the usual way:
Entering Values
As you've already seen, numbers are entered into PyCalc just as you would expect. There are a few special cases to be aware of:
Negative Numbers Enter with a minus sign in front |
|
Large Numbers Can be entered more easily with exponential notation |
|
Small Numbers Can be entered more easily with exponential notation |
|
Complex or Imaginary Numbers use the 'j' symbol |
|
Hexadecimal Numbers Prefix with '0x' Use the 'hex()' function to convert back |
|
Binary Numbers Prefix with '0b' Use the 'bin()' function to convert back |
Run Button
You've seen that PyCalc displays the result of your calculation immediately as you type it. Once you've typed out your full calculation, you can also press the Run
button:
Doing so will:
- Calculate the result — even in those cases where a result was not able to be shown immediately above the entry box.
- Move your calculation from the entry box into the history list (see below) so that it's available for you to review later.
- Copy your result to the iOS system clipboard so that you can paste it into other apps (if enabled in Settings).
- Save the result to the variable named
_
(underscore) when possible, for easy access in subsequent calculations. - Clear out the entry box.
History List
The history list is where your calculations go when you press the Run
button. Each entry in the list shows both the code that you used for the calculation and the result.
Many items can be stored in the list for reference later.
Click the code in the list item to repopulate that code back into the entry box for further calculations.
To delete an item, swipe left.
You can also delete the items in the list all at once in the Settings menu.
Keyboards
PyCalc provides several keyboards — each best suited for a different purpose:
Big+Easy Keyboard |
Primo Keyboard |
Combo Keyboard |
- Big+Easy Keyboard — This keyboard is best for the most basic calculations, where speed and ease of use are most important.
- Primo Keyboard — This keyboard is a good compromise for when the calculations are a little more complex, but you prefer to keep more of your screen real-estate available for the history list.
- Combo Keyboard — This keyboard is best for quickly working with complex calculations or Python code. It also makes special characters available like emoji.
The keyboard button is at the top of the display:
- Click the keyboard button to alternately show or hide your currently selected keyboard
- Long-press the keyboard button to quickly switch to a different keyboard
Long-pressing the Settings+Help
button will toggle between a right-handed layout and a left-handed layout.
These settings are also available within the Settings menu.
Trackpad
One of the reasons that working in PyCalc is efficient is that you can type a complex calculation and edit it until you get the result you're looking for.
As you'd expect, you can click directly within the entry box to reposition your cursor. However, it's often faster to use the built-in trackpad mode. Simply long-press any of the colored keys on the keyboard and then slide your finger. The cursor in the entry box will follow your finger movements around and you can drop the cursor wherever you like.
Precision Mode
When you enter numbers into PyCalc, they can be interpreted in different ways. 3 modes are supported:
- Standard Mode — This interprets your numbers in the same way as native Python.
- Decimal Mode — This interprets your floating point numbers and divisions as high-precision decimals. This allows PyCalc to optimize your results for a calculator application.
- Fractional Mode — This interprets your floating point numbers and divisions as fractions. This allows PyCalc to give results in a fractional format that is more natural for some kinds of applications — like working with imperial length units.
The Precision Mode indicator lets you know which mode is active:
Standard | |
Decimal | |
Fractional |
Long-press the precision mode indicator to switch modes. Unless there's a specific reason to prefer another mode, we strongly recommend Decimal mode.
What's Next?
Congratulations on working your way through the quick start guide! You should now be able to use PyCalc productively. But this is just the start of what it can do. Explore the other pages in the menu to dive deeper. In particular, check out the startup.py file, which allows you to configure PyCalc in powerful ways.