示例#1
0
    def read_degrees_to_rotate_image(self):
        """
        This method reads from the user the number of degrees to rotates an image file
        Evaluate the number inserted and returns the number of degrees if it is correct
        otherwise print an error message

        Return:
        degrees.- Number of degrees to rotate the image
                  If the number inserted is out of the valid range, the method returns 9999
        """
        image_handler = ImageHandler()
        msg_to_display = "Insert the number of degrees to rotate the image: "
        degrees = self.read_value_from_user(msg_to_display)
        degrees = int(degrees)
        if image_handler.validate_degrees_inserted(degrees) == True:
            return degrees
        else:
            return 9999