Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def calc(term):
purpose: This function is the actual calculator and the heart of the application
"""

# This part is for reading and converting function expressions.
term = term.lower()

# This part is for reading and converting arithmetic terms.
term = term.replace(" ", "")
term = term.replace("^", "**")
Expand All @@ -61,9 +64,6 @@ def calc(term):
"e",
]

# This part is for reading and converting function expressions.
term = term.lower()

for func in functions:
if func in term:
withmath = "math." + func
Expand Down