Apr-16-2021, 01:31 PM
It is always good idea to start with clarity in mind. What is required:
So task is actually: print all items in list x times where x is rounded up division of
As this is homework just pieces and bits:
Quote:Write some code that will print the lyrics that run through
your head. It should keep repeating each line one-by-one
until you've reached lines_of_sanity lines. Then, it should
keep going to finish out the current verse. After that, print
"MAKE IT STOP" in all caps (without the quotes).
Using the initial inputs from above, this
should print 9 lines: all 4 lines of the list twice, followed
by MAKE IT STOP"
So task is actually: print all items in list x times where x is rounded up division of
lines_of_sanity
and number of lines in verse (i.e. length of list). As this is homework just pieces and bits:
>>> list_ = ['bacon', 'spam'] >>> print(*list_, sep='\n') bacon spam >>> for _ in list_: ... print(*list_, sep='\n') ... bacon spam bacon spam
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.