KKC1234/Proj
0
1# Install Streamlit if it's not already installed2# !pip install streamlit3 4# Importing the Streamlit library5import streamlit as st6 7# Title of the web app8st.title("Welcome to Your First Streamlit App!")9 10# Simple text display11st.write("Streamlit is an amazing tool for building interactive web applications with Python.")12 13# Creating an interactive input box14name = st.text_input("Enter your name:")15 16# Display the name when user provides input17if st.button("Submit"):18 st.write(f"Hello, {name}! Welcome to your first Streamlit app.")19 20# Creating a simple number input field21age = st.number_input("Enter your age:", min_value=1, max_value=120)22 23# Display the age input24st.write(f"You are {age} years old.")25 26# Simple slider example27experience = st.slider("Rate your experience with Python (1-10):", 1, 10)28st.write(f"You rated your Python experience as: {experience}")29 30# End message31st.write("You can use Streamlit to build anything from simple dashboards to full-fledged applications!")32 