Below you can see the front-view size comparison of the Nikon D3500 and Pentax K-50. The Nikon D3500 is 6 mm narrower and 1 mm thinner than the Nikon D3500 but they have the same height of 97 mm.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.