True
True and False
False or False
not True
A variable holds a value that can change over time
x = 20
y = 40
z = y + 20
print(x,y,z)
x = 2.5
y = x * x
print(y)
7 % 2
7 // 2
7/2
x = "Raj"
y = 'Sunderraman'
z = '''Hello, How are you?'''
print(x)
print(y)
print(z)
print(x,y,z)
u = x + " " + y
print(u)
print(u[5])
u[0:3]
u[4:]
ord('a')
ord('b')
ord('A')
chr(97)
len("Raj")
xs = [10,20,30,40]
fs = []
ss = ['apple','orange','banana']
len(xs)
xs[0]
xs[0:2]
xs+ss
['a','p','p','l','e']
answer = xs[0] + xs[1] + xs[2]
print(sum)
answer = 0
for x in xs:
answer = answer + x
print(answer)
answer = 1
for x in xs:
answer = answer * x
print(answer)
answer = ""
for s in ss:
answer = answer + s
print(answer)
answer = 0
for s in ss:
answer = answer + len(s)
print(answer)
ts = (100112222,"Raj",4.0)
ts[0]
a collection of key-value pairs
ds = {100: ["apple","orange"], 101: ["apple"] }
es = {"john": [100,20,40], "jamie": [10,20] }
days_in_month = {1: 31, 2:28, 3:31, 12:31}
days_in_month[12]
def square(x):
z = x*x
return z
square(4)
square(5)
ord('h') - ord('a')
def encode(n,pt):
???
???
return answer