22import wmi
33version , updated = '0.4.0' , '4/21/2022'
44varName , varVal = [], []
5+ cMathInts , cMathSub = [], 0
56
67# Functions
78def systemInfoDisp ():
@@ -41,15 +42,18 @@ def printHandler(code):
4142 cEchoOut = cEcho * cEchoAmount
4243 return cEchoOut
4344 elif code == 'print_math' :
44- cMathInt1 = int (input ('First Integer: ' ))
45+ cMathIntCount = int (input ('Number of Integers: ' ))
46+ for i in range (0 , cMathIntCount ):
47+ cMathInts .append (int (input ('Integer: ' )))
4548 cMathOp = input ('Operator (+, -, *, /): ' )
46- cMathInt2 = int (input ('Second Integer: ' ))
4749 if cMathOp == '+' :
48- print ('{} + {} = ' .format (cMathInt1 , cMathInt2 ))
49- return (cMathInt1 + cMathInt2 )
50+ return sum (cMathInts )
5051 elif cMathOp == '-' :
51- print ('{} - {} = ' .format (cMathInt1 , cMathInt2 ))
52- return (cMathInt1 - cMathInt2 )
52+ cMathSub = cMathInts [0 ]
53+ for i in range (1 , len (cMathInts )):
54+ cMathSub -= cMathInts [i ]
55+ return cMathSub
56+
5357 elif cMathOp == '*' :
5458 print ('{} * {} = ' .format (cMathInt1 , cMathInt2 ))
5559 return (cMathInt1 * cMathInt2 )
@@ -58,6 +62,9 @@ def printHandler(code):
5862 return (cMathInt1 / cMathInt2 )
5963 else :
6064 return 'Invalid operator.'
65+
66+ cMathInts .clear ()
67+
6168 elif code == 'print.correct' :
6269 cCorrect = input ('Correct What? ' )
6370 return cCorrect .capitalize ()
0 commit comments