1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marta_Voda [28]
3 years ago
5

Lyrics = ["I wanna be your endgame", "I wanna be your first string",

Computers and Technology
1 answer:
ASHA 777 [7]3 years ago
8 0

Answer:

I am writing the Python program:

lyrics = ["I wanna be your endgame", "I wanna be your first string",

     "I wanna be your A-Team", "I wanna be your endgame, endgame"]

lines_of_sanity = 6

counter = 0

while counter <= lines_of_sanity+1:

 for line in lyrics:

   print(line)

   counter = counter + 1

print("MAKE IT STOP")

                                                                                                       

Explanation:

  • The lyrics is a list which has the following lines of song.

I wanna be your endgame

I wanna be your first string

I wanna be your A-Team

I wanna be your endgame, endgame

  • The value of lines_of_sanity is 6.
  • counter variable is initialized to 0.
  • The while loop starts which keeps executing until the value of counter becomes greater than 6 which is the value of lines_of_sanity
  • The for loop inside the while loop moves through each line of lyrics list and prints that line. The counter variable increments to 1 at each iteration.
  • Lets see what the while and for loops print at each iteration:

1st iteration: counter = 0, following line is displayed:

  • I wanna be your endgame
  • Value of counter increments by 1.
  • counter = 1

2nd iteration: counter = 1, following line is displayed:

  • I wanna be your first string
  • Value of counter increments by 1.
  • counter = 2

3rd iteration: counter = 2, following line is displayed:

  • I wanna be your A-Team
  • Value of counter increments by 1.
  • counter = 3

4th iteration: counter = 3, following line is displayed:

  • I wanna be your endgame, endgame
  • Value of counter increments by 1.
  • counter = 4

5th iteration: counter = 4, following line is displayed:

  • I wanna be your endgame
  • Value of counter increments by 1.
  • counter = 5

6th iteration: counter = 5, following line is displayed:

  • I wanna be your first string
  • Value of counter increments by 1.
  • counter = 6

7th iteration: counter = 6, following line is displayed:

  • I wanna be your A-Team
  • Value of counter increments by 1.
  • counter = 7
  • The program should keep going to finish out the current verse. So following line is displayed:
  • I wanna be your endgame, endgame
  • The loop breaks as the value of counter = 7 is greater than lines_of_sanity i.e. 6
  • So at last the print("MAKE IT STOP") statement is execute which displays the following line:
  • MAKE IT STOP
  • The program along with the output is attached.

You might be interested in
Why is this cite so rigged
xxTIMURxx [149]
I don’t get what your asking?
8 0
3 years ago
A carver begins work on the following block of granite that weighs 2700 g. What is the density of the granite?
bogdanovich [222]

Given that,

Mass of the block, m = 2700 g

Let the dimensions of the block are 20 cm, 5 cm and 10 cm.

To find,

The density of the granite.

Solution,

Let d is the density of the granite. We know that the density of an object is equal to the mass per unit volume. So,

d = m/V

or

d=\dfrac{2700\ g}{20\ cm\times 5\ cm\times 10\ cm}\\\\d=2.7\ g/cm^3

So, the density of the block is 2.7 m/s².

8 0
3 years ago
Preesure is drived quantity? why​
Marrrta [24]

Answer:

Basically, anything quantity that is not defined as one of the 7 base quantities is a derived quantity by definition. Pressure is not one of the 7 base quantities. Hence it is a derived quantity.

6 0
4 years ago
Read 2 more answers
Which are examples of embedded systems? Choose two answers.
SVEN [57.7K]

Answer:

An operating system inside a virtual machine

Smart TVs

Explanation:

We can explain an embedded systems like a system within other system, in this case we have two examples, the smart TV have an operative system in some cases an Android system, and this system is within the television system, the virtual machine is the same concept, we can have an Android system running in a windows system.

7 0
3 years ago
If a small monster collector:- Has 16 small monster containment devices and intends to use all of them.
valina [46]

Answer:

ajhgdfjjjh4hd

Explanation:gbbh

guguubshuhv

8 0
3 years ago
Other questions:
  • The two types of one-time-password tokens are ______ and ______.
    10·2 answers
  • The point on the middle of an edge in SketchUp is called a...
    5·2 answers
  • How do I turn of the noise canceling feature on my beats studio wireless?
    13·1 answer
  • Common types of possessed objects are smart cards, rfid-encoded badges, magnetic cards, ____, and smartphones that are swiped th
    7·1 answer
  • Why are Quick Parts useful in an Outlook message?
    5·1 answer
  • Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList v
    13·1 answer
  • Define a toString prototype method that returns the cat's name, gender, and age separated by semicolons.
    8·1 answer
  • Identify the correct answer in each item. Write your answer on the blank provided before
    13·1 answer
  • The batteries on electric vehicles are recharged using electricity from either a wall socket or dedicated charging unit.
    11·1 answer
  • Distinguish<br> between formal and Informal<br> Information System<br> Information systems
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!