Spaces:
No application file
No application file
Commit
•
1040dbe
1
Parent(s):
6ce464f
app.py
Browse files
app.py
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
|
2 |
-
import streamlit as st
|
3 |
-
|
4 |
-
def add(x,y):
|
5 |
-
return x+y
|
6 |
-
|
7 |
-
def sub(x,y):
|
8 |
-
return x-y
|
9 |
-
|
10 |
-
def multiply(x,y):
|
11 |
-
return x*y
|
12 |
-
|
13 |
-
def divide(x,y):
|
14 |
-
if y == 0:
|
15 |
-
return "sorry not possible"
|
16 |
-
else:
|
17 |
-
return x/y
|
18 |
-
|
19 |
-
st.title ("simple calcy byb mks")
|
20 |
-
|
21 |
-
num1 = st.number_input("enter first number")
|
22 |
-
num2 = st.number_input("entr second number")
|
23 |
-
|
24 |
-
choice = st.radio("selectv your choice",("add","sub","multiply","divide"))
|
25 |
-
|
26 |
-
if choice == "add":
|
27 |
-
result = (add(num1,num2))
|
28 |
-
elif choice == "substract":
|
29 |
-
result = (sub(num1,num2))
|
30 |
-
elif choice == "multiply":
|
31 |
-
result = (multiply(num1,num2))
|
32 |
-
elif choice == "divide":
|
33 |
-
result = (divide(num1,num2))
|
34 |
-
|
35 |
-
st.write("result is", result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|