Is it possible to program an iOS app using an iPad? As the title states, I am trying to ascertain whether or not it is possible to program (using XCode, I'm guessing) iOS apps for iPad and iPhone using an iPad. 

I cannot find any related details using Google or by searching the Apple website. Apple's recent advertisements lead me to believe they are marketing iPad as more of a general purpose computer and less of a tablet-centric device. If the former is true, it should be possible to create apps written in Swift using the device, right?
Yes and no, but mainly no. Let me explain.

You can't use an iPad (at least not yet) to go through the entire process (i.e. design, test, and submit your app). You also can't use Xcode on an iPad (at least not directly, although you could do this remotely - but that is not a practical solution).

People can and do use iPads for:


learning how to code
editing code using various editors (but not Xcode)
designing some of the other resources/assets used in apps (e.g. images, icons, sounds, etc)


However, most development is done using an integrated development environment (IDE) such as Xcode. Most apps for iOS (and macOS, tvOS, and watchOS) are programmed and submitted via Xcode, although there are alternatives.