Simple Arithmetic, Input and Output in Python

Precedence in Mathematical Operations

General precedence of arithmetic operations is followed by Python.

2 * (3 + 5) / 8-1

Output: 1.0

2 * (3 + 5) / (8 - 1)

Output: 2.285

value_1 = 2 * (3 + 5) / 8-1

value_2 = 2 * (3 + 5) / (8-1)

print(value_1)

print(value_2)