final

parent 5da40977
......@@ -106,3 +106,22 @@
2020-12-24 14:43:56.112465 : * : (3.2, 5.6, 1) = 17.92
2020-12-24 14:43:56.112465 : ^ : (5, 3) = 125.0
2020-12-24 14:43:56.112465 : + : (3.2, 5.4, 1.0, 6) = 15.6
2020-12-25 00:20:12.235082 : - : (2, 10.34) = -8.34
2020-12-25 00:20:12.257026 : - : (8, 2.3, 0, 4.55) = 1.15
2020-12-25 00:20:12.258056 : / : (25, 5.0, 2.5) = 0.092
2020-12-25 00:20:12.262011 : * : (3.2, 5.6, 1) = 17.92
2020-12-25 00:20:12.264005 : ^ : (5, 3) = 125.0
2020-12-25 00:20:12.265004 : + : (3.2, 5.4, 1.0, 6) = 15.6
2020-12-25 00:20:58.650001 : - : (2, 10.34) = -8.34
2020-12-25 00:20:58.650973 : - : (8, 2.3, 0, 4.55) = 1.15
2020-12-25 00:20:58.651994 : / : (25, 5.0, 2.5) = 2.0
2020-12-25 00:20:58.654962 : * : (3.2, 5.6, 1) = 17.92
2020-12-25 00:20:58.655959 : ^ : (5, 3) = 125.0
2020-12-25 00:20:58.656983 : + : (3.2, 5.4, 1.0, 6) = 15.6
2020-12-25 00:21:29.247291 : - : (2, 10.34) = -8.34
2020-12-25 00:21:29.248288 : - : (8, 2.3, 0, 4.55) = 1.15
2020-12-25 00:21:29.249322 : / : (25, 5.0, 2.5) = 2.0
2020-12-25 00:21:29.251219 : * : (3.2, 5.6, 1) = 17.92
2020-12-25 00:21:29.251219 : ^ : (5, 3) = 125.0
2020-12-25 00:21:29.252207 : + : (3.2, 5.4, 1.0, 6) = 15.6
2020-12-25 00:21:38.548252 : / : (4.0, 5.0) = 0.8
......@@ -10,8 +10,6 @@ def print_results(*args, action=None, result=None):
operands = args[:len(args)]
print('inp_args in pretty mode', operands, action, result)
from string import ascii_lowercase
# print(ascii_lowercase)
def argsPrint(operands):
lst=[]
for i in operands:
......
......@@ -24,8 +24,6 @@ def load_params(file="params.ini"):
for l in lines:
param = l.split('=')
param[1] = param[1].strip('\n')
if param[0] != 'dest':
param[1] = eval(param[1])
PARAMS[param[0]] = param[1]
......@@ -118,11 +116,11 @@ def calculate(*args, action=None, **kwargs):
if action == '/':
result = args[0]
if 0 in args[1:len(args)]:
return 'Деление невозможно'
else:
try:
for n in args[1:(len(list(args)))]:
result /= n
except ZeroDivisionError:
return "Ошибка деления на ноль"
if action == '^':
result = args[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment