Ver Mensaje Individual
  #12 (permalink)  
Antiguo 06/03/2009, 11:53
yuo2
 
Fecha de Ingreso: diciembre-2008
Ubicación: PERU
Mensajes: 294
Antigüedad: 15 años, 4 meses
Puntos: 23
Respuesta: cual es mi error -POO-

Bueno gente ya termine el codigo ya lo hice funcionar, aqui se los dejo para q lo tengan de ejemplito:

Código CODIGO TERMINADO:
Ver original
  1. ////interface.py////
  2.  
  3. import claseCliente
  4. import clasePuerta
  5.  
  6. nom=raw_input("ingrese su nombre: ")
  7. eda=raw_input("ingrese su edad: ")
  8. clien=claseCliente.cliente(nom,eda)
  9. clien.e_irdisco()
  10.  
  11. ////claseCliente.py////
  12.  
  13. import clasePuerta
  14. class cliente:
  15.     def __init__(self,pnomb,pedad):
  16.         self.pnomb=pnomb
  17.         self.pedad=pedad
  18.     def e_irdisco(self):
  19.         op=raw_input("Desea ir a Disco?: ")    
  20.         if op=="si":
  21.             obj=clasePuerta.PuertaDisco(self.pedad)
  22.             obj.e_asegurar()
  23.  
  24. //// clasePuerta.py ////
  25.  
  26. class PuertaDisco:
  27.     def __init__(self,maxedad):
  28.         self.maxedad=maxedad
  29.     def e_asegurar(self):      
  30.         if int(self.maxedad) < 18 :
  31.             print "NO PUEDE PASAR"
  32.         else:
  33.             print "ADELANTE PASE"
Y gracias a los que se tomaron el tiempo de ayudar: David el Grande y alvlin