Below you can see the front-view size comparison of the Nikon D3400 and Pentax K-500. The Pentax K-500 is 1 mm shorter and 5 mm thinner than the Nikon D3400 but it is also 6 mm wider.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.