5/3
1.6666666666666667
5//3
1
5%3
2
5**3
125

Assignment operator

x = 0
x +=10
x
10
x *=10
x
100
x/=10
x
10.0
x-=10
x
0.0
x +10
10.0
x
0.0
x +=10
x**=10
x
10000000000.0
x //=10
x
1000000000.0

comparison operator

x = 10
y = 11
x == y
False
x != y
True
x<y
True
x <=y
True

membership operator

dummy_list = ["siva", "ganesh", "madan"]
print("siva" in dummy_list)
True
print("sva" in dummy_list)
False
print("sva" not in dummy_list)
True
x = 10
y = 10

print(x is y)
True
bool([0.0])
True
bool((0.1))
True
x = [0.1, 0.2]

y = [0.1, 0.2]
print(x is y)
False
print(x is not y)
True
x = [0.1,0.2]
y = x
print(x is y)
True
y = x.copy()
print(x is y)
False

and, or , not

x = 10
y = 5
print(x>5 and y<10)
True
print(x<5 and y>10)
False
print(x<5 or y<10)
True

def functionname(inputs):

\(~~\)body, outputs

def summation(n):
  return n and n + summation(n-1)
summation(10)
55
def countdown(n):
  print(n)
  n and countdown(n-1)
countdown(10)
10
9
8
7
6
5
4
3
2
1
0
from IPython.display import clear_output
import time

def ball(n):
  clear_output(wait=True)
  print(" "*n, "o")
  time.sleep(1)
  n and ball(n-1)
ball(40)
 o