Ditto on the homework policy and request for a reprex.
And with that in mind, check out ggplot's barplot. In the aesthetics, you can have both the x-axis and fill refer to your Gender variable.
Using the example there with the mpg dataset built into ggplot2,
library(ggplot2)
ggplot(mpg, aes(x=class, fill=class)) + geom_bar()

Created on 2019-10-04 by the reprex package (v0.3.0)