Spaces:
Sleeping
Sleeping
trying to give it more options to perform the task
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def basic_calculator(num1:float, num2:float, act:str)-> float: #it's import to s
|
|
| 23 |
if act == '+' or act == 'add' or act == 'append' or act == 'plus':
|
| 24 |
answer = num1 + num2
|
| 25 |
action = '+'
|
| 26 |
-
elif act == '-' or act == 'minus' or act == 'sub' or act == 'subtract':
|
| 27 |
answer = num1 - num2
|
| 28 |
action = '-'
|
| 29 |
elif act == '*' or act == 'mul' or act == 'multiply' or 'times':
|
|
@@ -32,7 +32,7 @@ def basic_calculator(num1:float, num2:float, act:str)-> float: #it's import to s
|
|
| 32 |
elif act == '/' or act == 'div' or act == 'divide':
|
| 33 |
answer = num1 / num2
|
| 34 |
action = '/'
|
| 35 |
-
elif act == '^' or act == 'power' or act == 'exponentiation':
|
| 36 |
answer = pow(num1,num2)
|
| 37 |
action = '^'
|
| 38 |
else:
|
|
|
|
| 23 |
if act == '+' or act == 'add' or act == 'append' or act == 'plus':
|
| 24 |
answer = num1 + num2
|
| 25 |
action = '+'
|
| 26 |
+
elif act == '-' or act == 'minus' or act == 'sub' or act == 'subtract' or act == 'substract':
|
| 27 |
answer = num1 - num2
|
| 28 |
action = '-'
|
| 29 |
elif act == '*' or act == 'mul' or act == 'multiply' or 'times':
|
|
|
|
| 32 |
elif act == '/' or act == 'div' or act == 'divide':
|
| 33 |
answer = num1 / num2
|
| 34 |
action = '/'
|
| 35 |
+
elif act == '^' or act == 'power' or act == 'exponentiation' or act = 'pow':
|
| 36 |
answer = pow(num1,num2)
|
| 37 |
action = '^'
|
| 38 |
else:
|