I'm very new to Mathematica and I want to calculate percent multiplications. See below image. In In[3]
, I pressed space after 50% and then pressed 80%. Mathematica automatically added the multiplication sign. In In[4]
, I manually pressed *, the multiplication sign. Both seem not work. Where is the problem? Thanks.
1 Answer
The percent symbol %
in Mathematica represents the last output Out[-1]
, see the Documentation for Out
. Hence the results you observe.
In principle you can use Inline Free-form Input for this: press Ctrl+= and type your 50%, then press →, * and Ctrl+= again and type your next percent quantity 80%, and so on:
Then press Shift+Enter to perform the computation:
59/100
Alternatively you can take the suggestion by Michael E2 and define your own percent symbol like ¢ = 0.01
and then type 50¢
instead of 50%
with similar effect:
The symbol ¢
(\[Cent]
) has built-in alias EsccentEsc. So there are two ways to type it in the FrontEnd: as \[Cent]
or as EsccentEsc. It is also possible to define a keyboard shortcut for it using one of the methods described here:
-
$\begingroup$ I get the cent sign with the option key plus "4" but that may vary. $\endgroup$ Sep 11, 2019 at 10:28
-
$\begingroup$ @MichaelE2 On my system (Win7) Alt+4 is a shortcut for the "Section" style. $\endgroup$ Sep 11, 2019 at 10:31
%
represents the last output. SeeOut
in documentation. $\endgroup$¢ = 0.01
. $\endgroup$¢ = 1/100
. At the end, machine precision can be coerced usingN
if desired. $\endgroup$