This now seems to be an issue with the aperture not opening. That is why it could not auto focus; because the lens couldn't get enough light in. As well, it seems to be associated with me changing my camera to P mode.
Okay you guys, I really do appreciate all of your responses to my dilemma. As one post said it is quite disconcerting to not have my new camera working. I took it to a repair shop today and the guy was kind of weird he started off by telling me there was sand on my grip of my loans which there wasn't because I have not ever taken it to the beach and I don't have sand in my house. I also had the instructor of my photography class look at it but he is not that familiar with Pentex cameras. However, he did determine that the reason it was not focusing is because the aperture is dialed all the way down to almost closed.
I simply don't know what to do; I have tried everything. So, I will answer your questions below and hopefully this will give you some information to guide me. Thank you for your help.
* Is it a new or a used camera?
This is supposed to be a new camera. However I bought it on Amazon from a non-Pentax approved the seller, unbeknownst to me at the time. I am dubious about its origin because it did not come with the user manual. However I was able to take pictures with it when I first got it so I don't know what's going on at this point.
* Which lens are you using?
The lens I am using is a Pentax 18 to 135 mm. It is supposed to be one of the kit lenses that is offered by Pentax.
* Is it a new or used lens?
I think that is a new lens and as I said before I've taken pictures with it but please see my previous answer from my doubts about its origins.
* Is your battery fully charged?
The battery is fully charged and I also have the extended battery holder/grip for it.
* Does your lens have dedicated AF/MF switches?
No, I don't see any switches on the lens. The only autofocus / manual focus switch is on the camera itself.
* By "manual mode", do you mean M on the mode dial or the MF switch on the side?
By manual mode I was talking about the switch on the side.
* Which position was the mode dial in when you succesfully took a picture?
Previously, I did not encounter this problem. In retrospect, it was after my instructor told me to put my camera in P mode. However, now that I put it back in my U1 mode, I was just able to take a picture. Although the apperture still did not open it's like a pinhole, so it was a long exposure but I did get a photo.
* Did you try a factory reset?
I don't know what the factory reset procedure is. Although I did find whatever reset options I could and selected them to reset whatever it could.
* Did you insert an SD card?
Yes.
* Which slot does the SD card reside in?
Slot 1
* What did you try to take a photo of when it didn't work (especially, how close was it to your lens)?
When I couldn't get the picture of the camera to take a picture, I was in a somewhat dark classroom, taking a picture of the whiteboard. None of my classmates had any difficulty with this and they had various brands of cameras.
Please let me know what I should do next. I appreciate your help. Take good care,
~Antonio