A man pleaded guilty in Roanoke County Circuit Court on Thursday to attempting to strangle his former roommate with a hair dryer cord.