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
| void main() { | |
| print("¡Hola Mundo!"); | |
| var number =7+3; | |
| imprimir (number); | |
| } | |
| //Función | |
| imprimir (int numero){ | |
| print ('El numero es $numero'); | |
| } |
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
| void main() { | |
| for (int i = 0; i < 5; i++) { | |
| print('hello ${i + 1}'); | |
| } | |
| print ("\n"); | |
| print("¡Hola Mundo!"); | |
| print ("\n"); | |
| //Todo en dart es un objeto | |
| final double pi = 3.1416; |
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
| void main() { | |
| final double pi = 3.1416; | |
| print(pi); | |
| var cadena1 = 'castor'; | |
| var cadena2= 'mapache'; | |
| print("$cadena1\n$cadena2"); | |
| String texto='''en un lugar de | |
| Puebla, existía un lugar donde vendían cemitas\n'''; |
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
| void main(List<String> arguments) { | |
| //listas | |
| //listas(); | |
| //conjuntos(); | |
| mapas(); | |
| } | |
| void mapas() { | |
| var zodiaco = { | |
| 'C-1': 'Aries', |
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
| void main(List<String> arguments) { | |
| //condicionales(); | |
| //abreviada(); | |
| //anonima(); | |
| //anonima_abreviada(); | |
| //parametros_requeridos_opcionales(); | |
| parametros_nombrados(); | |
| } | |
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
| void main (List<String> arguments) { | |
| var harry = Aprendiz(nombre:'Harry Potter', | |
| escuela: 'Colegio hogwarts de Magia y Hechiceria', | |
| casa: 'Gryffindor', | |
| edad: 17 | |
| ); | |
| print(harry); | |
| var luna = Aprendiz(nombre:'Luna Lovegood', | |
| escuela: 'Colegio hogwarts de Magia y Hechiceria', |
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
| void main() { | |
| Asgardiano thor =Asgardiano() | |
| ..nombre='Thor' | |
| ..arma='Stormbreaker' | |
| ..padre='Odin'; | |
| thor.ataque(); | |
| thor.familia(); | |
| } |
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
| [6:42 p. m., 13/10/2020] Mich🖤: void main(List<String> arguments) { | |
| //NO PODEMOS INSTANCIAR UNA CLASE ABSTRACTA | |
| //var juego= Among_Us('Pepe','black'); | |
| var rosa = Impostor(name:'Rosalia', color:'Pink'); | |
| print(rosa); | |
| var celeste= Tripulante(name:'Cielo', color:'Blue'); | |
| print(celeste); | |
| celeste.report(); | |
| print(celeste.isAlive); |
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
| [6:42 p. m., 13/10/2020] Mich🖤: void main(List<String> arguments) { | |
| //NO PODEMOS INSTANCIAR UNA CLASE ABSTRACTA | |
| //var juego= Among_Us('Pepe','black'); | |
| var rosa = Impostor(name:'Rosalia', color:'Pink'); | |
| print(rosa); | |
| var celeste= Tripulante(name:'Cielo', color:'Blue'); | |
| print(celeste); | |
| celeste.report(); | |
| print(celeste.isAlive); |
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
| void main(List<String> arguments) { | |
| //NO PODEMOS INSTANCIAR UNA CLASE ABSTRACTA | |
| //var juego= Among_Us('Pepe','black'); | |
| var rosa = Impostor(name:'Rosalia', color:'Pink'); | |
| print(rosa); | |
| var celeste= Tripulante(name:'Cielo', color:'Blue'); | |
| print(celeste); | |
| celeste.report(); | |
| print(celeste.isAlive); |
OlderNewer