A microprocessor generally does not have RAM, ROM and IO pins. It usually uses its pins as a bus to interface to peripherals such as RAM, ROM, Serial ports, Digital and Analog IO. It is expandable at the board level due to this.
A microcontroller is 'all in one', the processor, ram, IO all on the one chip, as such you cannot (say) increase the amount of RAM available or the number of IO ports. The controlling bus is internal and not available to the board designer.
This means that a microprocessor is generally capable of being built into bigger general purpose applications than a microcontroller. The microcontroller is usually used for more dedicated applications.
All of these are very general statements. There are chips available that blur the boundaries.
This is really two questions in one...
Firstly, what is the difference between a microcontroller and a microprocessor?
Microprocessor is a purely a CPU that follows a set of instructions read from an external memory bus. It controls external peripherals (such as screen, keyboard, mouse, hard drive, etc) via an external communications bus. When you program a microprocessor, your program is external to the device. In a computer, this memory is initially the boot up BIOS ROM which initially reads the operating system from the hard drive into RAM memory, then continues to execute it from there.
Microcontroller is kinda like an all-in-one CPU + Memory, with some external ports to communicate with the outside world. It's self contained and doesn't use external memory to hold it's program (although if needed it can read and write working data to external memory).
Secondly, is programming a microcontroller and microprocessor the same?
In some ways yes, and in some ways no.
Assembly language is a broad term that describes a set of instructions that the CPU can directly understand. When you 'compile' assembly language, it doesn't really compile anything, all it does it convert it to a sequence of bytes that represent the commands and plugs in some relative memory locations. This is common to both microprocessors and microcontrollers.
However, different types of CPU understand a different set of CPU instructions. For example, if you write an assembly language program that works with a pic 16F877 microcontroller, it will be complete nonsense to a microprocessor or any other microcontroller outside of the 16Fxxx family of pic microcontrollers.
So, although assembly works in a similar way across all microprocessors and microcontrollers, the actual list of instructions that you write are very different. To write in assembly language, you need to have an in depth knowledge of the device's architecture, which you can normally get from the datasheet in the case of a microcontroller.
Best Answer
Microprocessors are generally targeted at higher end systems (at any given point in technology) since they will be used with external memory and perhaps external peripherals. The pin count generally is higher (you need external memory buses), the internal complexity higher (since you'd generally want a fast CPU, hardware floating point, and relatively large fast cache memory to reduce the performance hit from relatively slow external memory).
It's not a hard and fast thing- it's easy to find microcontrollers that are expensive and microprocessors that are cheaper.
One example that fits the context of your current reading about the Intel MCS-51 series- an 8031 is a microprocessor. Add 4K bytes of mask-programmed memory to it and it's a microcontroller (the 8051). The 8031 was generally cheaper than the 8051, 8751, 87C51, 89C51 and similar parts for many years. In fact, 8051s with mistakes in the mask ROM could be sold as 8031s since the internal ROM was disabled by hardware when used as an 8031 (the EA line).
So there is no inherent reason why one is more expensive than the other, just a different set of choices that manufacturers make in order to maximize their market share and profits.