File size: 1,182 Bytes
c5216da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""

Fancy Addition Calculator with Sidebar and Animations

Created on Sat Jul 12 10:49:24 2025

@author: somil

"""

import streamlit as st
import time

# Page Config
st.set_page_config(page_title="Addition Calculator", page_icon="βž•", layout="centered")

# Sidebar for input
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)

# Main title and animation
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)

# Animation for effect
with st.spinner("Calculating... 🧠"):
    time.sleep(1)  # Simple delay for effect

# Result
result = number1 + number2

st.success(f"πŸŽ‰ The sum of **{number1}** and **{number2}** is: **{result}**")

# Footer message
st.markdown("---")
st.markdown("<p style='text-align: center;'>🌟 Hope you have a <b>nice</b> day! 🌈</p>", unsafe_allow_html=True)