You asked
What shutter speed and iso should I use on a k 50 for indoor basketball?
Here is what the site says about that.
From Pentax K-50: Pentax K-50: A DSLR by Pentax with a 16.3-megapixel APS-C sensor, announced in 2013. A weather-sealed entry-level body that can also run on AA batteries with an optional holder. Specs - Maker: Pentax - Mount: Pentax K - Sensor: APS-C, 23.5 x 15.6mm, crop factor 1.5 - Resolution: 16.3 megapixels - Stabilisation: in the body - Announced: 2013 - Type: DSLR Price in France - Used: 264–274 € (MPB) Checked on 27 ...
From Wildlife and sport: Shutter speed: To freeze motion: about 1/500s for people running, 1/1000s for most sport, 1/2000s or faster for birds in flight. That pushes ISO up, so a body that stays clean at high ISO matters, and so does modern noise reduction software.
Quoted 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}.