Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getString(self):
- s = 'El libro ' + self.titulo + ' fue escrito por ' + self.autor + ' en el año ' + str(self.anoPublicacion) + ' y pertenece a la editorial ' + self.editorial + ' y tiene ' + self.cantPaginas + ' páginas'
- if ( self.titulo == "" or self.autor == "" or self.editorial == "" or self.anoPublicacion == 0 or self.cantPaginas == 0 ):
- if (self.titulo == ""):
- print ("Ingrese un titulo válido")
- if (self.autor == ""):
- print ("Ingrese un autor válido")
- if (self.editorial == ""):
- print ("Ingrese un editorial válido")
- if (self.anoPublicacion == 0):
- print ("Ingrese un año de publicación válido")
- if (self.cantPaginas == 0):
- print ("Ingrese una cantidad de páginas válidas")
- else:
- return s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement