Hi everyone - I have a very simple question (I think ). I have been trying to teach my kids to use streamlit and we decided to write a very simple “Guess a number” app. It generates a random number between 1 and 10 and asks the user to guess. The problem is, when a user enters the number and submits the guess the program re-runs and another number is generated.
Is there a way around it? Can I save somewhere the random number generated prior to an event (e.g. button click or Enter click in the input box)?
Please let me know whether it will require session state or something else?
Thank you in advance!