Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

CF1 Lab1

Project: CF1
Views: 149
Kernel: SageMath (system-wide)

Part 2. Assignment, Equality, and Arithmetic

With some minor exceptions, Sage uses the Python programming language, so most introductory books on Python will help you to learn Sage. Sage can do much that your favorite computer algebra system has to offer. Sage uses = for assignment. It uses == , <= , >= , < and > for comparison:

a=5
a
5

Logical Statments

2==2
True
a < 2
False
b=8
b > a
True
0 < -1
False

Sage provides all of the basic mathematical operations

2* 3
6
2**3
8
2^3
8
10 % 3
1
10/4
5/2
10 //4
2
4 * (10//4) + 10 % 3 == 10
False