I just read this post (below in quotes) from another thread in case you are interested in possibly doing a reset to initial settings. The sd card slot cleaning tool that was just mentioned has some good reviews about remedying sd card reading in cameras also, in case you have not looked there yet. The path below will bring you to the thread where the K-x reset is mentioned. Of course I am not sure, but as was discussed already in this thread, one or both of the SD slot contacts are possibly blocked or damaged.
This is the quote from the "K-x Reset" thread.
"Besides the reset Custom Settings there is a Reset to Initial Settings under the Set-Up menu. I have never done this so I do not know exactly what it does but I do know that it's different from the reset custom settings so hopefully that will help you."
This is a path to the thread itself.
Read more at:
https://www.pentaxforums.com/forums/6-pentax-dslr-discussion/125971-k-x-facto...#ixzz3bTMDDjUG
---------- Post added 05-28-15 at 06:05 PM ----------
I know that this is a matter of personal preference, but I myself never lend out my equipment. When it is not supervised or in a good bag with locks on it, it is hard to tell what could happen to it.