I'm trying to list the names and positions of teachers and facility at a university. When I try to run the program it does not work and I get an error message that says 'str' object has no attribute 'dean_print'
class TSC:
def __init__(self, President, Dean1, Dean2, Dean3, Dean4, Dean5, Chair1, Chair2, Chair3, Chair4, Chair5, Chair6, Chair7, Chair8, Chair9, Chair10):
self.president = President
self.dean_one = Dean1
self.dean_two = Dean2
self.dean_three = Dean3
self.dean_four = Dean4
self.dean_five = Dean5
self.chair_one = Chair1
self.chair_two = Chair2
self.chair_three = Chair3
self.chair_four = Chair4
self.chair_five = Chair5
self.chair_six = Chair6
self.chair_seven = Chair7
self.chair_eight = Chair8
self.chair_nine = Chair9
self.chair_ten = Chair10
def pres(self):
print(f"The President of TSC is ", end="")
print(self.president)
def deans(self):
print(f"The dean of the school of Arts & Sciences is ", end = "")
self.dean_one.dean_print()
print(f"The dean of the school of Education is ", end = "")
print(self.dean_two.dean_print1())
print(f"The dean of the school of Nursing and Wellness is ", end = "")
print(self.dean_three.dean_print1())
print(f"The dean of the school of Buisness ans Digital Media is ", end = "")
print(self.dean_four.dean_print1())
print(f"The dean of the school of Wizrady is ", end = "")
print(self.dean_five.dean_print1())
class Arts_and_Sciences:
def __init__(self, dean):
self.dean_one = dean
def dean_print(self):
print(f"{self.dean_one}")
def heads_AnS(self):
print(f"The head of of Art is ", end = "")
print(self.chair_one.heads1_print())
print(f"The head of Science is ", end = "")
print(self.chair_two.heads2_print())
class Education:
def __init__(self, dean):
self.dean_two_b = dean
def dean_print1(self):
print(f"{self.dean_two_b}")
def heads_Edu(self):
print(f"The head of Education is ", end = "")
print(self.chair_three.heads3_print())
print(f"The head of Teaching Skills is ", end = "")
print(self.chair_four.heads4_print())
class Nursing:
def __init__(self, dean):
self.dean_one_b = dean
def dean_print1(self):
print(f"{self.dean_three_b}")
def heads_Nrs(self):
print(f"The head of Nursing is ", end = "")
print(self.chair_five.heads5_print())
print(f"The head of Wellness is ", end = "")
print(self.chair_six.heads6_print())
class Business:
def __init__(self, dean):
self.dean_one_b = dean
def dean_print1(self):
print(f"{self.dean_four_b}")
def heads_Buss(self):
print(f"The head of Buisness is ", end = "")
print(self.chair_seven.heads7_print())
print(f"The head of Digital Media is ", end = "")
print(self.chair_eight.heads8_print())
class Wizardy:
def __init__(self, dean):
self.dean_one_b = dean
def dean_print1(self):
print(f"{self.dean_five_b}")
def heads_Wiz(self):
print(f"The head of Spells is ", end = "")
print(self.chair_nine.heads9_print())
print(f"The head of Potions is ", end = "")
print(self.chair_ten.heads10_print())
class Heads:
def __init__(self, head1, head2, head3, head4, head5, head6, head7, head8, head9, head10):
self.head_one = head1
self.head_two = head2
self.head_three = head3
self.head_four = head4
self.head_five = head5
self.head_six = head6
self.head_seven = head7
self.head_eight = head8
self.head_nine = head9
self.head_ten = head10
def heads1_print(self):
print(f"{self.head_one}")
def heads2_print(self):
print(f"{self.head_two}")
def heads3_print(self):
print(f"{self.head_three}")
def heads4_print(self):
print(f"{self.head_four}")
def heads5_print(self):
print(f"{self.head_five}")
def heads6_print(self):
print(f"{self.head_six}")
def heads7_print(self):
print(f"{self.head_seven}")
def heads8_print(self):
print(f"{self.head_eight}")
def heads9_print(self):
print(f"{self.head_nine}")
def heads10_print(self):
print(f"{self.head_ten}")
faculity = TSC("Pres Idint", "Scin Ark", "Eden Cathrine", "Nurswell Wells", "Bunson Meda", "Albus Dumbledore", "John Smith", "Paul Adam", "Betsy Zoe", "Simon Peter", "James Maddison", "Page Turner", "Max Scott", "Daniel Goodman", "Harry Potter", "Severus Snape")
faculity.pres()
faculity.deans()
When I ran the code I was expecting it to print out a list of people and their positions at the university. Instead of that happening I keep receiving the error message that I indicated above.