Distinguish Between Posts & Pages in WordPress

Have you ever had a need to distinguish between pages and posts? At one time I had a request to show ads on all posts but to exclude pages. I’m sure if I dug deep enough I could find a plugin to do handle the cases, but it’s really not that hard to distinguish between the two.

If you prefer to do the checks in php you can reference some built in functions:
If you would rather use script then the following is what you need: