Conformational statistics of short chains of poly(L‐alanine) and poly(glycine) generated by Monte Carlo method and the partition function of chains with constrained ends