Skip to content

Commit cb9c67a

Browse files
authored
Create solution.hide.py
1 parent 06e73ad commit cb9c67a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
def lyrics_generator(input_list):
2+
lyrics = ""
3+
count = 0
4+
5+
for num in input_list:
6+
if num == 0:
7+
lyrics += "Boom "
8+
count = 0
9+
elif num == 1:
10+
lyrics += "Drop the bass "
11+
count += 1
12+
13+
if count == 3:
14+
lyrics += "!!!Break the bass!!! "
15+
count = 0
16+
17+
return lyrics
18+
19+
# Your code above, nothing to change after this line
20+
print(lyrics_generator([0,0,1,1,0,0,0]))
21+
print(lyrics_generator([0,0,1,1,1,0,0,0]))
22+
print(lyrics_generator([0,0,0]))
23+
print(lyrics_generator([1,0,1]))
24+
print(lyrics_generator([1,1,1]))

0 commit comments

Comments
 (0)