import streamlit as st st.title("New App") st.write(""" My first app Hello *world!* """) my_name = st.text_input("What's your name?", "Luis Lozano") major_options = ["LAE", "LAF", "LEM", "LDO", "LIN", "ITC"] my_major = st.selectbox("What's your major?", major_options) five_year_goal = st.text_input("What would you like to do in 5 years?") number = st.slider("Pick a number, please", 0, 100) if (number < 60) and (number >= 18): job = st.checkbox('Do you have a job?') if job: my_job = st.text_input("What's your job?", 'Professor') output_text = f""" I'm {my_name} and I'm {number} years old! I work as {my_job}. I'm studying {my_major} and in 5 years I would like to {five_year_goal}. """ else: output_text = f""" I'm {my_name} and I'm {number} years old! I'm studying {my_major} and in 5 years I would like to {five_year_goal}. """ elif number < 18: output_text = f""" I'm {my_name} and I'm {number} years old! I'm studying {my_major} and in 5 years I would like to {five_year_goal}. """ else: output_text = f""" I'm {my_name} and I'm {number} years old! And in 5 years I would like to sleep. """ st.write(output_text)