a sixth grad classsells pennats and flags they earn a 1 dollar porfit each pennat and 6 dolalr each flag they sell 50 items the total profit is 115 how many pennats and flags were sold

Let's say the number of pennants sold is x.

Therefore, the number of flags sold is 50 - x.
The total profit from selling pennants would be x * $1 = $x.
The total profit from selling flags would be (50 - x) * $6 = $6(50 - x).
The total profit from both would be $x + $6(50 - x) = $115.
Expanding the equation, we get $x + $300 - $6x = $115.
Combining like terms, we get -$5x + $300 = $115.
Subtracting $300 from both sides, we get -$5x = -$185.
Dividing both sides by -5, we get x = 37.
Therefore, the number of pennants sold is 37 and the number of flags sold is 50 - 37 = 13. Answer: \boxed{37}.