forked from LearnWithLlew/DuplicationKata.Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLesson21.py
More file actions
20 lines (18 loc) · 731 Bytes
/
Lesson21.py
File metadata and controls
20 lines (18 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from Song import Song
class Lesson21(Song):
def sing_song(self, style,names):
if style == 1 :
for name in names:
if (name.startswith("L", 0)):
self.sing("Hip Hip Horray! For " + name)
else:
self.sing("Hello " + name + ", it's nice to meet you.")
elif style == 2:
for name in names:
if (name.startswith("am", 1)):
self.sing("Say yeah! Say yo! Say " + name)
else:
self.sing("Hello " + name + ", it's nice to meet you.")
elif style == 3:
for name in names:
self.sing("Hello " + name + ", it's nice to meet you.")