Hello guys,
Im trying to create a Streamlit app, to a friend of mine, in her company they need that every new candidate answer 55 questions of multiple choice, and them the Intern cheque the answers.
Hello guys,
Im trying to create a Streamlit app, to a friend of mine, in her company they need that every new candidate answer 55 questions of multiple choice, and them the Intern cheque the answers.
Hi @Judsonpp,
Thank you for sharing with the Streamlit community! I would recommend checking out our Cookbook documentation on input widgets and our documentation on streamlit.radio, which can be used to create radio buttons.
Feel free to let us know if you have any further questions after reviewing those pages and the included code snippets.
Best,
Caroline
Hi Caroline,
We are trying to generate a quiz application using streamlit. Please find the code attached here:
fill_in_the_blanks = {'questions': ['question1','question2'], 'answers': ['answer1','answer2']}
ans = []
mark = 0
with st.form(key = id_generator()):
for i,quest in enumerate(fill_in_the_blanks["questions"]):
st.write(i+1,quest)
x = st.text_input("Enter your answer here",key=id_generator())
ans.append(x)
submitted = st.form_submit_button(label='Submit')
if submitted:
# if answers are correct then
mark = mark+1
st.success("Test Score - "+str(mark))
Here, i am able to populate questions within the form widget. But, am not able to read text_input answers which is created with the help of for loop. How to read text_input value from user in this case. Please do the needful here.
Thanks,
Prakash
mail: prakash@deepsphere.ai
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.