As a student, as good as the iPad Pro has become, you will likely find the MacBook to be significantly more flexible than the iPad. If you can afford both, iPad will become an extremely useful companion device.
Together, MacBook and iPad are a very powerful combination. If you can afford only a single device, the MacBook will be more useful to you. Despite optimistic and creative marketing by Apple, an iPad cannot replace the functionality of a Mac or PC.
To be clear, as much as I would not myself wish to be without an iPad Pro, I cannot recommend it as a sole device. A further consideration worthy of mention is that “recovery” operations (e.g., restoring the installed Operating System - or resolving a forgotten passcode) require connection of the iPad to either a PC (with iTunes installed) or a Mac (with iTunes or Finder - as appropriate for the installed version of macOS).