Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# app.py
|
2 |
+
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
# Set the title of the app
|
6 |
+
st.title("Square Calculator")
|
7 |
+
|
8 |
+
# Create a slider for user input
|
9 |
+
x = st.slider('Select a value', 0, 100, 1) # Slider ranges from 0 to 100 with a default of 1
|
10 |
+
|
11 |
+
# Display the squared value
|
12 |
+
st.write(x, 'squared is', x * x)
|