Why are there masculine and feminine words in Spanish?

언어 선생님 이신가요?

Flag fr Frans Flag es Flag en Engels Flag it Italiaans Flag de Duits Flag pt Portugees Flag nl Nederlands