Comment calculer la zone et le périmètre d'une forme en python

Shape = input("what shape do you have: ")

if Shape == 'square':
	Kind = input("you want the area perimeter : ")
	if Kind == 'area':
		width = int(input("What's the width of the area? : "))
		height = int(input("What's the height of the area? : "))
		calculation = width * height
		print(f"It's {calculation}")
	if Kind == 'perimeter':
		width = int(input("What's the width of the perimeter? : "))
		calculation = width * 4
		print(f"It's {calculation}")
if Shape == 'rectangle':
	Kind = input("you want the area perimeter : ")
	if Kind == 'area':
		width = int(input("What's the width of the area? : "))
		height = int(input("What's the height of the area? : "))
		calculation = width * height
		print(f"It's {calculation}")
	if Kind == 'perimeter':
		width = int(input("What's the width of the area? : "))
		height = int(input("What's the height of the area? : "))
		calculation = width * 2 + height * 2
		print(f"It's {calculation}")
		
vagg