They can make a likely guess (the full year), and you tell them if they're wrong.
> whether you took college courses?
Yes, your college files Form 1098-T to tell the IRS this.
> how much you put into your IRA?
Yes, your IRA custodian (your bank) files Form 5498 to tell the IRS this.
> which purchases count as medical expenses?
Very few people spend enough on medical expenses to take a deduction for them. They have to exceed 7.5% of your AGI.
> the cost basis of the stock you sold?
Yes, your brokerage files Form 1099-B to tell the IRS this. There are only a few rare cases where they won't be able to report a cost basis.