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 combination (n, m): | |
| combs = [(x, y) for x in range() for y in range(m) if x != y] | |
| #combs.extend([(x, y) for x in range(m) for y in range(n) if x != y]) | |
| for comb in combs: | |
| print(comb, end='\n') | |
| combination(3, 5) |
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 fib(n): | |
| a, b = 0, 1 | |
| while b < n: | |
| print (b, end=', ') | |
| a, b = b, a+b | |
| print() | |
| fib (2000) |
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
| var miJuego= require('./juego'); | |
| console.log('juego id: ' + miJuego.juego.id + | |
| 'Jugadores: ' + miJuego.juego.jugadores[0] + | |
| ', ' + miJuego.juego.jugadores[1]); |
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
| function car(model, year, color){ | |
| this.model=model; | |
| this.color=color; | |
| this.year=year; | |
| }; | |
| car.prototype.getInfo= function(){ | |
| return this.model + " | " + this.year + " | " + this.color; | |
| }; |
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
| function car(model, year, color){ | |
| this.model=model; | |
| this.color=color; | |
| this.year=year; | |
| this.getInfo=getcarInfo; | |
| }; | |
| function getCarInfo(){ | |
| return this.model + " | " + this.year + " | " + this.color; | |
| }; |
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
| function car(model, year, color){ | |
| this.model=model; | |
| this.color=color; | |
| this.year=year; | |
| this.getInfo=function(){ | |
| return this.model + " | " + this.year + " | " + this.color; | |
| }; | |
| }; |