Unable to add two variable values

Hi, I am creating a app in streamlit that accepts user inputs and display the sum total of all the input values as the final output. I am using “form” for this.
This is like a calculator , that takes 4 values from the user and once the user hit “Calculate” button, it is supposed to add the 4 input integers and give the output.
ex:
Input value 1 = 300
input value 2= 200
input value 4= 100
input value 5 = 500
Total value = Input value 1 + Input value 2+Input value 3+Input value 4
st.write(Total value)

output = 1100

But, I am not getting any value, it is just displaying:
[
0: 300
1:200
2:100
3:500
]
How do I fix this?. Looks like the user input values are not getting stored in the respective variables

Thanks,

Hi @Vani_P,

Thanks for posting!

Can you please share a code snippet so we can reproduce the issue?

Caroline :balloon:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.