print "Select shape:"
print "1 rectangle"
print "2 Circle"
print "3 Triangle"
shape=input("> ")
if shape==1:
l=input("Length:")
b=input("breadth:")
area=l*b
print "The area of rectangle is", area
if shape==2:
r=input("radius:")
area=3.14*r*r
print "The area of circle is", area
if shape==3:
b=input("b:")
h=input("h:")
area=0.5*b*h
print "The area of Triangle is", area
Paste Link - Click
print "1 rectangle"
print "2 Circle"
print "3 Triangle"
shape=input("> ")
if shape==1:
l=input("Length:")
b=input("breadth:")
area=l*b
print "The area of rectangle is", area
if shape==2:
r=input("radius:")
area=3.14*r*r
print "The area of circle is", area
if shape==3:
b=input("b:")
h=input("h:")
area=0.5*b*h
print "The area of Triangle is", area
Paste Link - Click
0 comments:
Post a Comment