Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
|
|
|
|
|
|
|
|
|
3 |
x = st.slider('Select a value')
|
4 |
-
|
5 |
-
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# Get user input
|
4 |
+
user_input = st.text_input("Enter your name", "Your Name")
|
5 |
+
|
6 |
+
# Display the slider and calculate the square
|
7 |
x = st.slider('Select a value')
|
8 |
+
square_result = x * x
|
9 |
+
|
10 |
+
# Display the user input and the result
|
11 |
+
st.write(f"Hello, {user_input}! {x} squared is {square_result}")
|