File size: 236 Bytes
683afa9
 
 
 
 
 
 
1
2
3
4
5
6
7
import streamlit as st

# Create a slider with predefined minimum, maximum, and starting value
x = st.slider('Select a value', min_value=0, max_value=100, value=50)

# Display the value and its square
st.write(f'{x} squared is {x * x}')