|
|
|
"""
|
|
Fancy Addition Calculator with Sidebar and Animations
|
|
Created on Sat Jul 12 10:49:24 2025
|
|
@author: somil
|
|
"""
|
|
|
|
import streamlit as st
|
|
import time
|
|
|
|
|
|
st.set_page_config(page_title="Addition Calculator", page_icon="β", layout="centered")
|
|
|
|
|
|
st.sidebar.header("Enter Numbers Here")
|
|
number1 = st.sidebar.number_input("Enter Number 1", min_value=0, max_value=100, value=12)
|
|
number2 = st.sidebar.number_input("Enter Number 2", min_value=0, max_value=100, value=12)
|
|
|
|
|
|
st.markdown("<h1 style='text-align: center;'>β¨ Basic Addition Calculator β¨</h1>", unsafe_allow_html=True)
|
|
st.markdown("<h3 style='text-align: center;'>Letβs crunch some numbers ββ</h3>", unsafe_allow_html=True)
|
|
|
|
|
|
with st.spinner("Calculating... π§ "):
|
|
time.sleep(1)
|
|
|
|
|
|
result = number1 + number2
|
|
|
|
st.success(f"π The sum of **{number1}** and **{number2}** is: **{result}**")
|
|
|
|
|
|
st.markdown("---")
|
|
st.markdown("<p style='text-align: center;'>π Hope you have a <b>nice</b> day! π</p>", unsafe_allow_html=True)
|
|
|