I have been derelict in not saying more about Codea, twolivesleft.com, and Simeon Nasilowski. I’ll date this in the past to put it where it belongs.
Until now, as far as I know, there has been no way to create an iPad app on the iPad itself. There was the very interesting iLua app, which never quite got to the point where you could deploy a program that you had written. It appeared to me that the ILua folks had run afowl of the Apple determination not to allow iPad apps to be written on the iPad. If there are other ways to build an iPad app on the iPad, I have not found them.
Until Codea. Codea is an implementation of the Lua language on the iPad, and there is a way - somewhat convoluted, admittedly - to move what you build into Xcode and then deploy it as a real iPad app. The excellent and challenging game Cargo-Bot is written in Codea, for example.
Codea has a decent code editor / IDE, at least by iPad standards. It has some built in prompting for known library functions, it supports a simple but powerful drawing model, and has some very nicely chosen editor features that make it almost painless to write a program.
There are deficiencies, mostly due to Apple regulations. Other than copying it from a web location and pasting it into your own program, there’s no good way for two people to share code. (OK, there is this thing where you attach your iPad as a drive to your computer and fiddle with its internal file structure. I don’t consider that to be a good way, but YMMV.)
But Codea has sprites, a number of powerful library functions including 3D and even physics simulations. It ships with a large number of example programs that serve as a good introduction to what can be done.
All this for the price of $9.99. I feel this compares favorably to, say, Visual Studio. It’s a lovely program, and I thank Simeon for making it available.