Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- class Pc(object):
- def __init__(self):
- self.partes = ['hardaware','software']
- self.stdout = 'pantalla'
- self.stdin = 'teclado'
- self.nombre = 'Pc'
- class Netbook(Pc):
- def __init__(self,arch,sistema,procesador):
- Pc.__init__(self)
- self.arch = arch
- self.portable = 'muy portatil'
- self.sistema = sistema
- self.procesador = procesador
- def ver(self):
- print ('Una netbook %s arquitectura %s' %(self.procesador,self.arch))
- print ('Contiene un sistema %s y es %s' %(self.sistema,self.portable))
- print ('Es de la familia %s' %(self.nombre))
- for i in self.partes:
- print ('Partes : %s' %(i))
- hp_mini = Netbook("x86","GNU/Linux","intel")
- hp_mini.ver()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement