You'll be able to use the full range of apertures. The only thing is that you have to fiddle with a couple of settings on the camera (which don't interfere with the use of "modern" lenses at all, so don't worry about that) and you'll have to manually meter the exposure.
The process is well outlined in other posts, so I'll just say that while it the explanation may look/sound confusing, in practice it is simplicity itself. It basically boils down to you selecting the aperture on the lens and then pushing the AE-L button to meter the scene and have the camera automatically set the shutter speed for you.
Naturally, that's not something you would want to be doing while trying to do something like shoot rapidly changing scenes like sports, but for other things the extra step is not burdensome at all and it lets you take advantage of using some lenses which may have a few years on them, yet which still take fantastic photographs.
Best of all, this ability to use practically any lens ever made for Pentax gives you a very broad range of choices for expanding your lens assortment by dipping into the deep pool of pre-loved lenses. It is a way to get quality lenses without paying the premium prices for new ones. It's a budget-challenged photographer's dream come true.
Many of those older lenses are still highly sought after today and command premium prices. At the same time, a great number of lenses which are in lower demand yet which can still provide quality results are widely available at very affordable prices.
The 50mm f2 lens you received is one of those. They sell for around $30-40 typically and can readily be found. The f1.4 and f1.7 versions of the 50mm lens are more highly prized, helping to keep the price of the less-loved f2 very affordable. I bought the "A" version of the 50mm/f2 lens from
KEH for around $50 and love it. (Although just today I did pick up an "M" 50mm/f1.4 from eBay). Once you get the hang of the very easily learned manual metering process, you'll find that your 50/2 will provide you with many very satisfactory photographs. I have hanging on the wall next to me an A4 sized head shot of my son, taken with the 50/2. I couldn't be more pleased with it if I had gone to a studio and paid a professional to take it.
While the "M" lenses are perfectly useable, you will find that "A" lenses, with their ability to communicate aperture information to the camera, provide wider functionality and ease of use. For one thing, they're painless to use with Pentax's P-TTL flash, relieving you of the mental calisthenics of doing calculations with the flash's guide number and subject distance in order to figure out your aperture setting. You can choose from a range of apertures and the flash output will automatically adjust accordingly. Also, in aperture priority mode if you set the aperture ring to "A" the camera already "knows" what aperture you want to use and can automatically adjust exposure with normal metering, meaning you don't have to use the additional step of pressing the AE-L button. That means you
can use it for rapidly changing scenes such as sports, provided you are handy enough with the manual focus. And with the ring set to "A" you can also use the "P" mode on the camera, which will automatically select both shutter speed and aperture for you, leaving you nothing to do manually but focus. Naturally, this greatly enhanced useability means that "A" lenses command higher prices than "M" lenses as a general thing. In my opinion, it is worth it, at least in lenses of a focal length which you foresee yourself using with flash.
To sum it up:
The ability to use these older lenses is one of the most endearing features of the Pentax dSLRs. They provide you the ability to get more bang for your buck, as well as an alternate stimulating and refreshing "mode" of enjoying photography. Their acquisition is relatively economical, the quality of photos is from good to excellent, and their use is not at all difficult to learn.
Come on in; the water's fine.