My App
Phase 1 — Core Foundations

Operators

Arithmetic, comparison, and logical operators — and, or, not instead of &&, ||, !

Arithmetic operators

a = 10
b = 3

print(a + b)    # 13
print(a - b)    # 7
print(a * b)    # 30
print(a / b)    # 3.3333333333333335

Python has two operators JS/TS doesn't have directly:

Floor division — divides and rounds down to a whole number:

10 // 3   # 3

Modulus — the remainder after division:

10 % 3   # 1

Power — exponent:

2 ** 3   # 8

Full list:

OperatorMeaning
+addition
-subtraction
*multiplication
/division
//floor division
%remainder
**power

Comparison operators

These should feel familiar:

a == b
a != b
a > b
a < b
a >= b
a <= b

Important: Python doesn't have a strict-equality operator like ===. There's only ==.

Logical operators

JS/TS uses symbols; Python uses words.

JS/TSPython
&&and
||or
!not
age >= 18 and is_active
is_admin or is_manager
not is_active

On this page