Commit 6dfb48f5 authored by muris2016's avatar muris2016
Browse files

Nombres de variables mejorados

parent ae06b60c
......@@ -6,19 +6,19 @@ import calcoohija
import calcoo
def operating(calculator, operation, numbers):
def operating(calc, operation, numbers):
ans = int(numbers[0])
for num in numbers[1:]:
ans = calcoo.do_operation(calculator, operation, ans, int(num))
ans = calcoo.do_operation(calc, operation, ans, int(num))
if __name__ == "__main__":
script, filename = sys.argv
calculator = calcoohija.CalculadoraHija()
calc = calcoohija.CalculadoraHija()
file = open(filename)
for line in file.readlines():
operation = line.split(',')[0]
numbers = line.split(',')[1:]
operating(calculator, operation, numbers)
operating(calc, operation, numbers)
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