Yep,

Draw a line (clicking on the end point as well as the start), then type the length you want, hit return and the line will re-size itself. Same works with a rectangle, but use a comma between the axes.

I usually make the initial line / rectangle obviously wrong so that I can see that the dimensions have definitely moved.