To find out how many notebooks the girl can buy, you can divide the total amount of money she has by the cost of each notebook.
She has $40 and each notebook costs $7.
\[ \text{Number of notebooks} = \frac{\text{Total money}}{\text{Cost per notebook}} = \frac{40}{7} \]
Calculating this gives:
\[ \frac{40}{7} \approx 5.714 \]
Since she cannot buy a fraction of a notebook, she can buy 5 notebooks.
So, she can buy 5 notebooks.