Entering Input
Entering Input
Out[]=
A quick introduction to entering and evaluating computations of any kind.
In a Wolfram notebook, just type an input, then press + to compute:
2+2
Out[]=
4
1+2+3
Out[]=
6
Use the last output as input:
%+4
Out[]=
10
After you perform a calculation, the Suggestions Bar will provide options for further computation:
Standard symbols work for mathematical operations:
5+2*3-7.5
Out[]=
3.5
Use parentheses (not braces or brackets) to show levels of grouping:
((5-3)^(1+2))/4
Out[]=
2
The Wolfram Language has built-in functions, covering many areas of mathematics and science.
6051
Arguments to built-in functions are separated by commas and enclosed in square brackets:
Max[2,7,3]
Out[]=
7
If you don’t know what function to use, type = at the beginning of a line for natural-language input:
plot a sine curve
Lists represent collections of items and are indicated by {...}:
{1,2,3}{"water","sodium chloride","benzene"}
Lists are ordered. They can contain numbers, variables, computations or even other lists.
Many operations are applied elementwise:
Many operations are applied elementwise:
{1,2,3}+2
Out[]=
{3,4,5}
In some languages, lists (or arrays) start their index at 0, in Wolfram Language, they start at 1. Elements of lists may be extracted using the function , which also has the shorthand {...}[[n]]]:
{"water","sodium chloride","benzene","ferrocne"}[[3]]
Out[]=
benzene
Easily construct lists with functions like :
Range[10]
Out[]=
{1,2,3,4,5,6,7,8,9,10}
Out[]=