You asked

Pentax k or nikon f?

The site has no Nikon F page, so the guide can't compare it with the Pentax K. Among the Pentax K bodies it covers, the three to weigh are:

Resolution is only part of the choice. Lens choice matters more for light and subject motion: a wide aperture gives faster shutter speeds in dim light and more background blur, as the lenses guide explains. Whichever body you pick, buy a lens in its Pentax K mount. For portraits, a 50mm f/1.8 is the cheapest great lens, and on APS-C it behaves like a classic 75-80mm portrait lens, as the portrait guide notes.

If you tell the guide what you photograph and how much you want to spend, it can narrow the Pentax K choice further.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.