Purple colour of flower is a dominant trait in pea plants. The genotype of such plants can be determined by test cross. Test cross determines that the dominant character is coming from homozygous dominant genotype or heterozygous genotype e.g., purple flower coming from PP or Pp. It can be done by crossing plants with purple coloured flowers with plant having white coloured flowers, which will always have homozygous recessive genotype.
If the progenies obtained have all purple flowers the genotype of purple flower would be PP ar shows in the following cross.
Thus, the genotype of pea plant bearing purple coloured flowers in the school garden can be pp or PP.