diff --git a/productividad.py b/productividad.py new file mode 100644 index 0000000000000000000000000000000000000000..2d2a9b83faeb7deea099d2211ecf6f1675847892 --- /dev/null +++ b/productividad.py @@ -0,0 +1,19 @@ +import csv + +def count_lines(file_path): + with open(file_path, 'r') as file: + reader = csv.reader(file) + next(reader) + return sum(1 for _ in reader) + +peticionesGrande = count_lines("medidasGrande.csv") +peticionesPequeña = count_lines("medidasPeque.csv") +prodGrande = peticionesGrande / 251 +prodPequeña = peticionesPequeña / 251 + +with open('peticiones_juntos.csv', 'w', newline='') as file: + writer = csv.writer(file) + writer.writerow(['numeroPeticionesGrande', 'numeroPeticionesPeque']) + writer.writerow([peticionesGrande, peticionesPequeña,]) + writer.writerow(['productividadGrande', 'productividadPeque']) + writer.writerow([prodGrande, prodPequeña]) \ No newline at end of file