Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Game:
- def __init__(self, name, rating, price, publisher):
- self.name = name
- self.rating = rating
- self.price = price
- self.publisher = publisher
- gameList.append(Game)
- class User:
- def __init__(self, username, password, balance, library):
- self.username = username
- self.password = password
- self.balance = balance
- self.library = library #this will be an array which will be added via, gta.name etc
- userList.append(User)
- gameNames = []
- gameList = []
- userList = []
- GTA4 = Game("grand theft auto 4", "3/5", 45, "rockstar") #name, stock, price, publisher
- jamie = User("joji", "2low4ahoe", 244, [GTA4])
- print(GTA4.name + GTA4.rating)
- print(jamie.library)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement