Mendel's Law of Segregation states that a diploid organism passes a randomly selected allele for a trait to its offspring, such that the offspring receives one allele from each parent.
Explanation:
A Male's testies includes two chromosomes which are x and y (sperms)
XX= female
XY= male
A female's ovaries also have 2 chromosomes but both are x.
Whichever sperm ( depending on the x and y) enters the eggs that's the gender of the baby. If a x sperm enters the egg first it's a girl because the girl egg already contains the x chromosome so it's a gir. If a y sperm enters the egg first then it's a boy.
I know this wasn't the question but hoped I helped you out a little bit more :)