-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex40_2.py
29 lines (20 loc) · 833 Bytes
/
ex40_2.py
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
class Song(object):
def __init__(self, lyrics):
self.lyrics = lyrics
def sing_me_a_song(self):
for line in self.lyrics:
print(line)
happy_bday = Song(["Happy birthday to you",
"I don't want to get sued",
"So I'll stop right there"])
bulls_on_parade = Song(["They rally around tha family",
"With pockets full of shells"])
lyrics_kings_never_die = ["Here to stay",
"Even when I'm gone",
"When I close my eyes",
"Through the passage of time",
"Kings never die"]
kings_never_die = Song(lyrics_kings_never_die)
happy_bday.sing_me_a_song()
bulls_on_parade.sing_me_a_song()
kings_never_die.sing_me_a_song()