You asked
Which is better for headshots the 77mm f 1 8 or the 50mm f 1 4 sdm aw?
The guide has no 77mm f/1.8 lens, so it can't compare that one. For headshots, the closest page it does cover is the Pentax HD D FA* 85mm f/1.4 ED SDM AW, which is a full-frame lens.
For headshots, the 85mm is the better choice. The portraits guide calls the 85mm the classic full-frame portrait lens, with flattering perspective, soft backgrounds and a comfortable working distance. Longer lenses flatter faces because you stand further away, which keeps noses and chins in proportion.
The Pentax HD D FA* 50mm f/1.4 SDM AW is a fine general lens. It's a full-frame standard prime for the Pentax K mount, with f/1.4, autofocus and no stabilisation. On full frame it gives a natural, slightly tight view, so it works for head-and-shoulders shots but you'll stand closer and get less compression. It suits you more if you also shoot food, street or low light. The guide's first lenses advice puts a fast 50mm at the centre of a starter kit for that reason.
If headshots are your main job, the 85mm is the better buy. The 50mm is the better all-rounder.
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}.