Skip to content

Commit 74da727

Browse files
Merge pull request geekcomputers#311 from kishan0725/FirstBranch
Test commit
2 parents ef88c96 + 203bfe8 commit 74da727

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

calculator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Description : Uses Pythons eval() function
44
as a way to implement calculator.
55
6-
Functions available:
6+
Functions available are:
77
--------------------------------------------
88
+ : addition
99
- : subtraction
@@ -41,10 +41,10 @@ def calc(term):
4141
term = term.replace('rad', 'radians')
4242
term = term.replace('mod', '%')
4343

44-
functions = ['sin', 'cos', 'tan', 'sqrt', 'pi', 'radians', 'e']
44+
functions = ['sin', 'cos', 'tan', 'cosh', 'sinh', 'tanh', 'sqrt', 'pi', 'radians', 'e']
4545

4646
# This part is for reading and converting function expressions.
47-
for function in functions:
47+
for function in functions:
4848
if function in term.lower():
4949
withmath = 'math.' + function
5050
term = term.replace(function, withmath)

0 commit comments

Comments
 (0)