Once you have typed it in (assiming you are using the command prompt in Windows), you can right click on the title bar -> edit -> mark. Then highlight the section you want to copy and press enter. It's on your clipboard at this point so you can paste it into your assignment.
If that didn't help then please can you be more specific as to what you need help with.
I am sure the reason why they want you to save your code is to prevent the loss of it in case of a crash...this question 3 that you are ref 2, what did you populate the table login_details with? because how / what will you translate??