Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python gender input


def prefix(genders):
    if(genders == 'male' or genders == 'Male'):
        print(f"You're a {genders}.")
    elif(genders == 'female' or genders == 'Female'):
        print(f"You're are a {genders}.")
    else:
        print('unknown gender')

genders = input('Please, enter your gender: ')

prefix(genders)
 
PREVIOUS NEXT
Tagged: #python #gender #input
ADD COMMENT
Topic
Name
9+6 =