Here is the IRS guidance regarding the purchase of a computer as a Qualified Higher Education Expense:
The purchase of computer or peripheral equipment, computer software, or Internet access and related services, if it's to be used primarily by the beneficiary during any of the years the beneficiary is enrolled at an eligible postsecondary school. (This doesn't include expenses for computer software for sports, games, or hobbies unless the software is predominantly educational in nature.)
https://www.irs.gov/pub/irs-pdf/p970.pdf (see page 60)