So let's say that for some reason you cannot use any buttons to turn off your Apple iPhone or Apple iPad. For the purposes of this story, assume that the power button (sleep/wake) is not working. As a result, pressing the power button and the home button is also not resetting your device. Since the Apple iPhone 7 doesn't have a mechanical home button, a change was made. To reset the phone, users have to press the power button for 3 seconds, and press volume down while still pressing the power button. But again, we are assuming that this method is not working.
Is there a way to turn off the iPhone or iPad that doesn't require a button? Well, you can always keep the phone or tablet running until the battery is dead. That would do the trick, although it obviously is not a practical solution. With iOS 11, however, there is a software based method that will shut down your iOS device. Go to Settings > General > Shut Down (in blue font on bottom) > Slide power button to the right.
Besides a glitch or a problem causing the buttons to fail, perhaps there is a reason why you can't use physical buttons. Whatever the reason, if you are having trouble turning off your iPhone or iPad with the usual methods, remember that with iOS 11 installed, you can shut down your phone or tablet with the aforementioned four easy steps.