shape = input('What shape?(rectangle or square) ') if shape == 'square': sqr_side = int(input('What is the length of 1 side of your square? ')) square_p = sqr_side*4 square_a = sqr_side*sqr_side print(f'{square_p} is the perimeter of your square') print(f'{square_a} is the area of your square') elif shape == 'rectangle': rect_height = int(input('What is the height of your rectangle? ')) rect_length = int(input('What is the length of your rectangle? ')) rect_a = rect_length * rect_height rect_p = rect_length * 2 + rect_height * 2 print(f'{rect_p} is the perimeter of your rectangle') print(f'{rect_a} is the area of your rectangle')