In genetics, the basic unit of heredity is known as a gene. Genes are found on chromosomes and are responsible for determining traits in living organisms. Each gene can exist in different forms called alleles. For example, the gene for flower color in pea plants has two main alleles: one for purple flowers and one for white flowers.
Based on this information, which of the following statements correctly describes the role of genes in heredity?