วันจันทร์ที่ 14 กันยายน พ.ศ. 2558

Lab 4x : Calculate circum and area of rectangle

def setup():
   w = 3
   h = 7
   print("Height = ",h)
   print("Weight = ",w)
   print("Value of Area = ",area(w,h))
   print("Value of Circumference = ",circum(w,h))
 
def area(w, h):
   area = w*h
   return area

def circum(w,h):
   circum = (2*w)+(2*h)
   return circum

setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น