Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. class Game:
  2. def __init__(self, name, rating, price, publisher):
  3. self.name = name
  4. self.rating = rating
  5. self.price = price
  6. self.publisher = publisher
  7. gameList.append(Game)
  8.  
  9. class User:
  10. def __init__(self, username, password, balance, library):
  11. self.username = username
  12. self.password = password
  13. self.balance = balance
  14. self.library = library #this will be an array which will be added via, gta.name etc
  15. userList.append(User)
  16.  
  17. gameNames = []
  18. gameList = []
  19. userList = []
  20.  
  21. GTA4 = Game("grand theft auto 4", "3/5", 45, "rockstar") #name, stock, price, publisher
  22. jamie = User("joji", "2low4ahoe", 244, [GTA4])
  23.  
  24.  
  25. print(GTA4.name + GTA4.rating)
  26. print(jamie.library)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement