assign role after registration (male female)
You can add a field to the user entity at admin/config/people/accounts/fields. Let's use the List (text) type and call it "field_gender" with the possible values of female|Female and male|Male. Display it on the user registration form.

Then you can use Rules module to react e.g. when someone creates an account and perform various actions. The idea is that you create two different rules for assigning either the male or the female role.


Install Rules if you haven't already done so, and create a new
rule at admin/config/workflow/rules/reaction/add.  Choose a name
for it and tag it if you want. The rule should react on the following
event: After saving a new user account.
Add a condition in the next step and choose Data
comparison. Then type or select account:field-gender in the data
selector.  
Choose the data value in the next step to be Female. 
Now your condition is ready, add an action, select Add user role,
then choose the female role.
Repeat these steps and create a rule
for assigning the male role.