Commit 0f91fca4 authored by muris2016's avatar muris2016
Browse files

Modificado con respecto a

parent de658c50
......@@ -20,15 +20,12 @@ class Calculadora:
def do_operation(calc, operation, op1, op2):
return calc.operating(calc.operations[operation], op1, op2)
except KeyError:
sys.exit("Not allowed operation " + operation)
if __name__ == "__main__":
op1 = calc.to_number(sys.argv[1])
operation = sys.argv[2]
op2 = calc.to_number(sys.argv[3])
op1, operation, op2 = calc.take_args()
calc = Calculadora()
print(do_operation(calc, operation, op1, op2))
Supports Markdown
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