every time a user interacts with a widget, Streamlit simply reruns your script
from top to bottom, assigning the current state of the widget to your variable
in the process.
For example, if the user moves the slider to position 10, Streamlit will
rerun the code above and set x to 10 accordingly. So now you should see the
text "10 squared is 100".
Widgets can also be accessed by key, if you choose to specify a string to use as the unique key for the widget:
```python
import streamlit as st
st.text_input("Your name", key="name")
You can access the value at any point with:
st.session_state.name
```
Every widget with a key is automatically added to Session State. For more information about Session State, its association with widget state, and its limitations, see Session State API Reference Guide.
