1. I stayed there for two weeks.

2. I stayed there two weeks.

Are both grammatical?
my sister needs help

They are both grammatical.

Both sentences are grammatically correct, but they have slightly different meanings.

1. "I stayed there for two weeks." This sentence indicates that you stayed at a certain place for a duration of two weeks. The word "for" is used to indicate how long you stayed.

2. "I stayed there two weeks." This sentence implies that you stayed at a certain place, and the two weeks specify the duration. It omits the word "for" but still conveys the same meaning.

So, both sentences are grammatically correct, but the use of the word "for" in the first sentence provides additional clarity and makes it clearer that the two weeks represent the duration of your stay.