I have created this code but i keep getting the error:
TypeError: __init__()
missing 4 required positional arguments: 'exercise'
, 'friendliness'
, 'intelligence'
, and 'drool'
This is my code below:
class Dog_card_player: #creates the class
def __init__(self,name, exercise, friendliness, intelligence, drool):
self.name = name
self.exercise = exercise#.random.randint(1,100)
self.friendliness = friendliness#.random.randint(1,100)
self.intelligence = intelligence#.random.randint(1,100)
self.drool = drool#.random.randint(1,100)
def Card_stats_player(self): #creates the stats for the card
print("Name: " + self.name)
print("Exercise: " + self.exercise)
print("Friendliness: " + self.friendliness)
print("Intelligence: " + self.intelligence)
print("Drool: " + self.drool)
def Printing_card_player():
with open ("dogswrite.txt") as f1:
Dog_name_player = Dog_card_player(f1.readline())
Dog_name_player.Card_stats_player()
Printing_card_player()