p2 / app.py
Hem345's picture
Update app.py
d3d5220 verified
raw
history blame contribute delete
307 Bytes
import streamlit as st
# Get user input
user_input = st.text_input("Enter your name", "Your Name")
# Display the slider and calculate the square
x = st.slider('Select a value')
square_result = x * x
# Display the user input and the result
st.write(f"Hello, {user_input}! {x} squared is {square_result}")