Any DSLR and associated lenses can make for stunning photos today... There no bad choice. What would make the difference, really is the subject, lighting, composition and the photographer eyes. In other words: you.
I had K5, now K3. K5 is an old but quite capable and sturdy camera. At a good price, this is likely one of the best camera you could have to begin in photography. The one thing where it struggle is autofocus. The autofocus is ok for most still subject in daylight but not that great for action/sport/low light/shallow dof. It is ok but basic. In Pentax land, K3 (but also K3-II, K1 and KP) have much much better autofocus. Maybe not at the level of the best of the best, but good enough. Understand still that in any brand to get great autofocus you would have to spend at least twice what a used K5 should cost you...
Sharpness of lenses is honestly a completely irrelevant factor theses day because all are sharp enough... The limitation of most lenses is the resolution of the camera used, meaning Canon/Nikon have had for years very expensive FF cameras and they get the best shapness benchmarks because theses multi thousand dollars camera allowed for sharper pictures. But in real life, nobody care. Only other photographer will ever ask you the gear used for a great photo. Except you zooming at 100% in your photo editor, nobody will ever see the difference between a sharp and not so sharp lens. A 16 or 36MP pixel camera neither.
Some people over there or on the internet will try to convince you that you'd see the difference in 30x40" prints (75cmx100cm) and larger if you stare at them wih a magnifying glass from 10" away. But nobody does that in real life.
Example DA55-300, an entry level Pentax lens by all mean not sharp, but as sharp as the competition in the same price range:
DA55-300
Example, with DA15, a very small prime that many criticize for its slow apperture and lack of sharpness in reviews. Reality is that it manage to grab contrast and colors in a way few competitor manager to achieve... And it more than sharp enough:
DA15
Pentax design lens to be conveniant, practical and to make for beautifully rendered photos, not to please reviewers focussing on meaningless sharpness measures.
F135 a lens about to be 30 year olds, arguably noticably soft wide open... Is it really an issue or does it render portraiture just fine?
FA77, on of the mythic Pentax prime lens that is both small, extremely sharp and make for lovely pictures. Many people from all brand would kill to get one
From actual experience, on the exact same photo, your post processing skill, your screen or your choice of printer/paper or photo studio will have much more impact on the perceived image quality than if you have the sharpest lens ever of the kit lens. And much much more important that the rest are the subject, the lighting, the composition, the right moment rather than anything technical.