abdullahshoaib5616 commited on
Commit
2d801e1
·
verified ·
1 Parent(s): 2acd2bb

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Currency list
4
+ countries = [
5
+ "Pakistan", "United States", "China", "India", "Russia", "Japan", "Germany", "United Kingdom", "France", "Brazil",
6
+ "Canada", "Australia", "Italy", "South Korea", "Spain", "Mexico", "Indonesia", "Turkey", "Saudi Arabia",
7
+ "Switzerland", "Netherlands", "Argentina", "South Africa", "Egypt", "Thailand", "Sweden", "Norway", "Poland",
8
+ "Malaysia", "Singapore", "Philippines", "Vietnam", "Greece", "Portugal", "Denmark", "Iran", "Iraq", "Israel",
9
+ "UAE (United Arab Emirates)", "Nigeria", "Kenya", "Colombia", "Chile", "Peru", "New Zealand", "Bangladesh",
10
+ "Sri Lanka", "Nepal", "Afghanistan", "Qatar"
11
+ ]
12
+
13
+ st.title("Currency Converter 💰")
14
+
15
+ # Select currencies
16
+ from_currency = st.selectbox("From Currency:", countries)
17
+ to_currency = st.selectbox("To Currency:", countries)
18
+
19
+ amount = st.number_input("Amount:", min_value=0.01, value=1.0)
20
+
21
+ if st.button("Convert"):
22
+ st.success(f"{amount} {from_currency} = [Converted Amount] {to_currency}")