-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp_speak.py
More file actions
35 lines (30 loc) · 1.09 KB
/
exp_speak.py
File metadata and controls
35 lines (30 loc) · 1.09 KB
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
from math import *
from speech_drive import *
def process_eqn():
question = gideon_asks('What is the expression: ')
question = question.lower()
question = question.replace(" ", "")
if "power" in question:
question = question.replace("power", "^")
if "square" in question:
question = question.replace("square", "^2")
if "cube" in question:
question = question.replace("cube", "^3")
if "star" in question:
question = question.replace("star", "*")
if "into" in question:
question = question.replace("into", "*")
if "by" in question:
question = question.replace("by", "/")
if "plus" in question:
question = question.replace("plus", "+")
if "minus" in question:
question = question.replace("minus", "-")
if "openbrackets" in question:
question = question.replace("openbrackets", "(")
if "closebrackets" in question:
question = question.replace("closebrackets", ")")
question = question.replace(" ", "")
return question
def get_values():
pass