-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpirpleClasses.py
More file actions
48 lines (31 loc) · 919 Bytes
/
pirpleClasses.py
File metadata and controls
48 lines (31 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Pirple Classes - Section 9
# class ClassName:
# def __init__(self):
# self.Attribute = 0
# def AnotherFuntion(self):
# Action(s)
# class Team:
# def __init__(self, Name = "Name", Origin="Origian"):
# self.TeamName = Name
# self.TeamOrigin = Origin
class Team:
def __init__(self, Name = "Naimer", Origin = "origianer"):
self.TeamName = Name
self.TeamOrigin = Origin
def defineTeamName(self, Name):
self.TeamName = Name
def defineteamorigin(self, Origin):
self.TeamOrigin = Origin
Team1 = Team("Tigers", "Chicago")
Team2 = Team("Hawks","New York")
Team3 = Team()
print(Team1.TeamName)
Team1.defineTeamName("Dolphins")
print(Team1.TeamName)
print(Team1.TeamOrigin)
Team1.defineteamorigin("CHICAGO")
print(Team1.TeamOrigin)
print(Team2.TeamName)
print(Team2.TeamOrigin)
print(Team3.TeamName)
print(Team3.TeamOrigin)