This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import sys | |
| import os | |
| fn = "Nombre del documento" | |
| try: | |
| fn = sys.argv[1] | |
| except: | |
| print("Error, not enough parameters") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| main.cpp: From JSON generates SVG using std::ostringstream | |
| Grafos | |
| Created by Raymundo Torres, Alberto Pacheco, Jesus Escobar 13/10/2021 | |
| */ | |
| #include "json/json.h" | |
| #include <iostream> | |
| #include <tuple> // tie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| main.cpp: From JSON generates SVG using std::ostringstream | |
| Grafos | |
| Created by Raymundo Torres, Alberto Pacheco, Jesus Escobar 12/10/2021 | |
| */ | |
| #include "json/json.h" | |
| #include <iostream> | |
| #include <tuple> // tie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| main.cpp: From JSON generates SVG using std::ostringstream | |
| Grafos | |
| Created by Raymundo Torres, Alberto Pacheco, Jesus Escobar 02/10/2021 | |
| */ | |
| #include "json/json.h" | |
| #include <iostream> | |
| #include <tuple> // tie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| int main(void){ | |
| int a,b; | |
| cout << "dame el valor de a ="; | |
| cin >> a; | |
| cout << "dame el valor de b ="; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <fstream> | |
| #include <iostream> | |
| using namespace std; | |
| int main(void){ | |
| int outval=3; | |
| ofstream WriteFile("myfile.txt"); //apertura fichero en modo escritura | |
| WriteFile << outval; //escribimos el valor outval en el fichero | |
| WriteFile.close(); //cierre del fichero |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main(){ | |
| auto a = 10'000'000.55; | |
| auto b = 2222; | |
| auto c = 'C'; | |
| auto r = a + b * c; //implicita | |
| auto s = int(a) + int(b) * int(c); //explicita | |
| cout<< "r= " << r << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Matriz: | |
| def __init__(self,lst): | |
| self.row = len(lst) | |
| self.column = len(lst[0]) | |
| self.A = lst | |
| def printMatrix(self): | |
| stringM = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| list=[] | |
| for i in range(6): | |
| list.append(int(input('Ingrese número ganador: '))) | |
| list.sort() | |
| print('Números ganadores: ') | |
| print(*list, sep=', ') | |
| print(f'Números ganadores: {", ".join(str(x) for x in list)}') | |
| print('Números ganadores: {} {} {} {} {} {}'.format(*list)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def creador_dict(cadena): | |
| '''Recibe una cadena de caracteres y regresa un diccionario con las palabras (keys) y conteo (value)''' | |
| lista_1= cadena.split() | |
| dict_1={} | |
| for i in list_1: | |
| if i in dict_1: | |
| dict_1[i] +=1 | |
| else: | |
| dict_1[i]= 1 | |
| return dict_1 |
NewerOlder