menu = """ Pick a shape(1-3): 1) Square 2) Rectangle 3) Triangle """ shape = int(raw_input(menu)) if shape == 1: length = float(raw_input("Length: ")) print "area of square = ", length ** 2 else: print "Not a valid shape, try again"