-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class player: | ||
|
||
def __init__(self,name,age,team,num): | ||
self.name = name | ||
self.age = age | ||
self.team = team | ||
self.num = num | ||
|
||
|
||
def info(self): | ||
print(f'이름: {self.name}') | ||
print(f'나이: {self.age}') | ||
print(f'팀: {self.team}') | ||
print(f'등번호:{self.num}') | ||
print() | ||
|
||
|
||
player1 = player('김상수',32,'삼성 라이온즈',7) | ||
player2 = player('이대호',40,'롯데 자이언츠',10) | ||
player3 = player('소형준',21,'KT WIZ',30) | ||
|
||
player1.info() | ||
player2.info() | ||
player3.info() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +0,0 @@ | ||
class player: | ||
|
||
def __init__(self,name,age,team,num): | ||
self.name = name | ||
self.age = age | ||
self.team = team | ||
self.num = num | ||
|
||
|
||
def info(self): | ||
print(f'이름: {self.name}') | ||
print(f'나이: {self.age}') | ||
print(f'팀: {self.team}') | ||
print(f'등번호:{self.num}') | ||
print() | ||
|
||
|
||
player1 = player('김상수',32,'삼성 라이온즈',7) | ||
player2 = player('이대호',40,'롯데 자이언츠',10) | ||
player3 = player('소형준',21,'KT WIZ',30) | ||
|
||
player1.info() | ||
player2.info() | ||
player3.info() | ||
|
||