To know whether it is a hardware or a software problem try a hard reset using the buttons and check if this resolves the problem. Scroll down to the bottom of the page to view the procedure using the buttons.
If it still fails after a hard reset it is a hardware problem.
Note: Be aware that a hard reset will erase all your data and downloaded apps. It will restore the tablet to its factory default condition. Also if the tablet has a Google account tied to it, you will need to know the account name and password so as to be able to access the tablet after the reset has been performed due to the FRP lock (factory reset protection) being enabled by the reset.