Take this one step at a time. Your teacher has given you the code for step 1. Now write step 2. Then 3, and so on.
For step 2: if you're using Python v2.x you'd use a line like
guess = int( raw_input( "Take another guess: " ) )
For Python v3.x it would be:
guess = int( input( "Take another guess: " ) )
Break it down into small pieces, it's not a complicated assignment.