Getting started

Sage can do all elementary arithmetic operations such as “+,-,*,/”. For example addition and subtraction can be performed as
Similar with multiplication and division:
The command (_) refers to the previous result:
Square root:
Pi can be entered as:
All Sage commands begin with lowercase letters. To execute a command, press shift and enter at the same time.

The goal of this document is not to teach you numerical analysis, but to explain how to express your ideas in Sage. By numerical computation, we essentially mean machine precision floating point computations.

Type in the first cell, hold the shift key down, and press the enter key.

sage: a=1
You may be surprised that nothing appeared to happen. In fact, the value 1 was assigned to the variable a, but this result was not echoed. Repeat on the cell below; click on the cell, then use "shift-enter" or click on "evaluate". So if you type