def parralelogram_calculator(question): error = "Please enter an number higher than 0" while True: try: side = float(input(question)) if side > 0: return side else: print(error) except ValueError: print(error) length=parralelogram_calculator("enter the size of your side: ") height=parralelogram_calculator("enter the height of your shape: ") area=(length*height) perimeter=(length+length+length+length) print(f"The area of the parralelogram is: {area}") print(f"The perimeter of the parralelogram is: {perimeter}")