Using input to generate output

Hello! I am new to streamlit and trying to build an app that takes some user inputs and calculates output. I managed to get some code around the different inputs that the user can pick up (sidebar). I need help with generating an output by using these inputs. For eg: In the example below, if I pick up race = white, then I need to be able to assign a value of 20% and if race = Asian, then 25% and so on… how can I do this using the inputs and then print these outputs in the main section? See code below for input parameters.

def user_input_features():
        gender = st.sidebar.selectbox("Select Gender",("Male", "Female"))
        age = st.sidebar.selectbox("Select Age group",("0-24", "25-34", "35-44", "45-54", "55-64", "65-74", "75-84", "Above 85"))
        race = st.sidebar.selectbox("Select your Race",("White", "Black", "Asian", "LatinX", "American Indian/Alaskan Native", "Others"))
        state = st.sidebar.selectbox("Select your state",("Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colarado", "Connecticut","Delaware","Florida", "Georgia","Hawaii",
            "New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota",
            "Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"))

        st.sidebar.text ("")
        st.sidebar.text ("")

        NPI1 = st.sidebar.checkbox ("I wash my hands as per CDC Guidelines")
        NPI2 = st.sidebar.checkbox ("I practice social distancing as per CDC Guidelines")
        NPI3 = st.sidebar.checkbox ("I use face coverings as per CDC Guidelines")
        data = {'gender': gender,
                'age': age,
                'race': race,
                'state': state,
                'NPI1': NPI1,
                'NPI2': NPI2,
                'NPI3': NPI3}
        features = pd.DataFrame (data,index=[0])
        return features

input_df = user_input_features()