Advertisement
Alx09

Untitled

May 9th, 2022
883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.92 KB | None | 0 0
  1. class Arbore():
  2.    
  3.     def __init__(self, trasaturi, nume, prenume, gradRudenie):
  4.         self.trasaturi = trasaturi
  5.         self.nume = nume
  6.         self.prenume = prenume
  7.         self.gradRudenie = gradRudenie
  8.     def afisareDate(self):
  9.         print(self.trasaturi + " - " + self.gradRudenie + " - " + self.nume +" " + self.prenume)
  10.  
  11. trasaturi = []
  12. trasaturi.append(Arbore("Sarguninciosa", "Baloi", " Georgiana", "mama"))
  13. trasaturi.append(Arbore("Destept", "Baloi", " Ioan", "tata"))
  14. trasaturi.append(Arbore("Frumusete, creativitate", "Baloi", "Georgeta", "Bunica"))
  15. trasaturi.append(Arbore("Indelenticire", "Baloi", " Ion", "Bunic"))
  16. trasaturi.append(Arbore("Ambitia", "Baloi", "Ioana", "Bunica"))
  17. trasaturi.append(Arbore("Talentul la desenat", "Baloi", "Ana", "Strabunica"))
  18. trasaturi.append(Arbore("Nu mostenesc nici-o trasatura de la", "Baloi", " Ioan", "Strabunic"))
  19. for tras in trasaturi:
  20.     tras.afisareDate();
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement