This is an interactive way of using pen within projects that I have made. You could change the variables to change the way the rectangle looks. You could also press space bar and it will ask you what variable you would like to change and then set what number.
The y1 Variable changes where the line on the top of the rectangle is. The y2 Variable changes where the line on the bottom changes. The x1 Variable changes where the line on the left is. The x2 Variable changes where the line on the right is. Don't forget that you could press space bar to set a specific variable to a specific number!