YES, but you may also be asked further questions, if applicable such as what year of a degree you are pursuing, to determine if you are eligible for certain credits. If you were only a graduate student in 2018, the American Opportunity Tax Credit will not be available, but the Lifetime Learning Credit may be.
If you graduated in 2018 and continued to medical school, you would answer "No" to "Did you complete 4 years of a degree before 2018?"
The reason you want to pay close attention to these questions is the fact that the American Opportunity Tax Credit is usually more valuable than the Lifetime Learning Credit. The AOTC can only be claimed 4 times (per student per lifetime this includes any times someone else took it in regards to your expenses, such as your parents) AND it can only be taken when you're in the first four years of a degree. If you are still finishing the Senior year, and the AOTC has not been claimed four times already, you may claim it even though you became a Graduate student later that same year.
4 times means 4 times. First four years of a degree means Freshman, Sophomore, Junior, Senior.
[edited 03.27.2019 I 3:51pm]