Created
November 20, 2012 19:14
-
-
Save dlitvakb/4120341 to your computer and use it in GitHub Desktop.
This file contains 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 Jugador(object): | |
def __init__(self, nombre, sexo): | |
self.nombre = nombre | |
self.sexo = sexo | |
if __name__ == '__main__': | |
jugadores = [] | |
cantidad_jugadores = int(raw_input('Ingrese la cantidad de jugadores: ')) | |
for x in xrange(cantidad_jugadores): | |
print 'Jugador %s' % (x + 1,) | |
jugadores.append(Jugador( | |
raw_input('Ingrese su nombre: '), | |
raw_input('Ingrese su sexo: ')) | |
) | |
for jugador in jugadores: | |
print jugador.nombre, 'es de sexo', jugador.sexo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment