Yes to be considered a student for the year, attending school in any part of any 5 months meets that time criteria. Here is an extract from IRS Publication 501.
Student defined.
To qualify as a student, your child must be, during some part of each of any 5 calendar months of the year:
A full-time student at a school that has a regular teaching staff, course of study, and a regularly enrolled student body at the school; or
A student taking a full-time, on-farm training course given by a school described in (1), or by a state, county, or local government agency.
The 5 calendar months don't have to be consecutive.
Full-time student.
A full-time student is a student who is enrolled for the number of hours or courses the school considers to be full-time attendance.
**Say "Thanks" by clicking the thumb icon in a post**Mark the post that answers your question by clicking on "Mark as Best Answer"