Build a Song Pattern
Python
25 pts
Build a Song Pattern
Build a tuple song in one line that contains, in this order:
- the item
"start", - the
rhythmtuple repeated 3 times, - the items of the list
extra(convert it to a tuple), - the item
"end".
Print song and then its length.
Expected output:
('start', 'drum', 'clap', 'drum', 'clap', 'drum', 'clap', 'bell', 'end')
9
Checklist
- Keep
rhythmandextraunchanged and build the tuplesongin one line:"start", the rhythm 3 times, the items ofextra, then"end". - Print
songand then its length.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
