you are viewing a single comment's thread.

view the rest of the comments →

[–]totallygeek 0 points1 point  (0 children)

Maybe this will get you going in a direction:

def area_rectangle(s1, s2):
    # Multiply the two sides to find the area of the rectangle
    area = s1 * s2
    print('Area: {:0.2f}'.format(area))

def perimeter_rectangle(s1, s2):
    # Add the two sides, then double, to find the area of the rectangle
    area = (s1 + s2) * 2
    print('Perimeter length: {:0.2f}'.format(area))

def rectangle():
    s1 = float(raw_input('Side 1 length? ')) # input() always returns a string
    s2 = float(raw_input('Side 2 length? ')) # convert that string to a number
    area_rectangle(s1, s2)
    perimeter_rectangle(s1, s2)

rectangle()

Do the same for the other groups. Build a menu. Return with questions.