35mm and 50mm refer to the focal length of the lens, which affects the angle of view. Don't confuse the 35mm focal length of a lens with the 35mm film format.
For a camera that takes 35mm film, and shoots a standard 36×24mm frame thereon, a 50mm lens is in the range of what is considered a “
normal lens”, and approximates the angle of view of the human eye. The same holds true of “full-frame” or “FX-format” DSLRs, which have a sensor that is about the same size as a standard frame on 35mm film.
* Both your D40 and your D3100, however, are “DX-format” cameras.* Their sensor is smaller than a standard 35mm film frame, and so the lens needs to be scaled down accordingly, to get the same angle of view. A lens with a focal length of 35mm is a “normal lens” on that camera, approximating the same angle of view as a human eye, or as a 50mm lens on an FX camera or a 35mm film camera.
So, for most purposes, a 35mm lens will be more desirable to you than a 50mm lens. On your camera, a 50mm lens would be a “slightly-telephoto” lens, giving about the same angle of view that a 75mm lens would give on an FX or 35mm film camera.
As for ƒ/1.8 vs ƒ/1.4, that refers to how wide the
aperture can open. A smaller number means a wider aperture, which lets in more light. An ƒ/1.4 lens will open slightly wider than an ƒ/1.8 lens,letting in more light. A lens that can open wider is more desirable, and is referred to as being “faster” than a lens that doesn't open as wide.