The hedgehog gene has the same role in humans and in fruit flies because this gene gives instruction to make proteins that are essential for the growth and development of the body. Genes have the recipes for making of proteins of all type. Genes have the same function in all type of organisms which is to give instructions to the cells for making proteins necessary for the growth, development and survival of that organism.
The answer is both in males and females; only in males. Males
have one Y chromosome and one X chromosome, while females
have two X chromosomes. In mammals, the Y chromosome controls a
gene which is the SRY, which produces embryonic improvement as a male. The Y chromosomes of males and
other mammals also contain other genes needed for normal sperm production.