Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

#forecast

x=3.6
y=2
a="Baby"
b="Love"
t=True
f=False
print(x+y)
print(x-y)
print(x*y)
print(x/y)
print(x%3)
print(121%y)
print(5**y)
x +=5
print(x)
print(25//y)
y +=2.5
print(y)
x -=y
print(x)
y *=y
print(y)

#placeholder
x=15
y=26.4222
z=7.578
print("x=%d.y=%.1f.z=%.2f"%(x,y,z))

#namesurename
abc="Abhishek"
defg="Chhunju"
print("My name is",abc,".","Surename is",defg)

#Input
x=input("What's your name?:")
print("Nice to meet you",x)

x=input("No. of Pen?:")
y=input("add no. of Pen?:")
print("total pen",x+y)

x=input("No. of Pen?:")
y=input("add no. of Pen?:")
print("total pen",int(x)+int(y))

#split
a,b,c=input("give me three names:").split()
print(a,b,c)

name=input("what is your name?:")


height=input("%s. How tall are you?(cm)"%name)
print("The height of ",name,"is",height,"cm")

###INPUT
width=input("enter the width:")
height=input("enter the height:")
###PROCESS
area=float(width)*float(height)
###OUTPUT
print("the area of rectangle=%.2f" %area)

You might also like