> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/programming/courses/python-pcap-31-03-course/overview-and-introduction/basic-arithmetic-in-python.md).

# Basic Arithmetic in Python

## Arithmetic in Python

Arithmetic operators:

* Addition: +
* Subtraction: -
* Multiplication: \*
* Division: /
* Modulus operator (to get remainder): %

```python
num1 = 3
num2 = 10

answer = num1/num2
print(answer)
# returns 0.3 <-- which is float data type
```

#### Modulus:

```python
print(10 % 3)
# retunrs 1 - i.e Remainder

# As opposed to division
print(10 / 3)
# returns 0.3
```

### Order of operations:

```python
print(10 + 3 * 9 - 4) 
# returns 33
```

Multiplication first, then subtraction then addition
