Since you got your period after sex, you can't be pregnant. Your dates are off - you took a test on the 9th of what month? July? (You said you got your period on July 27th, I assume you mean June 27th?). If you took a test on July 9th and it was negative, you're not pregnant.
Your period is late for other reasons, including stress, hormonal swings or a change in body chemistry.