answer.
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]
2 years ago
5

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

Computers and Technology
1 answer:
ASHA 777 [7]2 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
Write a function named shout. The function should accept a string argument and display it in uppercase with an exclamation mark
Andrei [34K]

Answer:

void shout(String w) {

System.print.out(w + "!")

}

3 0
1 year ago
Brittany just pulled up a database table with employee information that contains 50 records of employees at her company. Which o
lesantik [10]

Answer:

The answer is: Operations.

Explanation:

A database operation accesses to information of a relational database. In this case, Brittany has creates the database operation that select employee information of her company and the database has returned a result set. The SQL statement to perform operations on a database are:

  • INSERT
  • SELECT
  • UPDATE
  • DELETE

3 0
2 years ago
If parties in a contract are not ____, the contract can be canceled.
Anastasy [175]
Agreed to all the terms mentioned in the contract
5 0
2 years ago
Write a sequence of statements that create a file named "greeting" and write a single line consisting of "Hello, World!" to that
tia_tia [17]

Answer:

The solution code is written in Python 3 as below:

  1. outfile = open("greeting.txt", "w")
  2. outfile.write("Hello World")
  3. outfile.close()

Explanation:

To create a simple text file in Python, we can use Python built-in function, <em>open()</em>. There are two parameters needed for the open() function,

  1. the file name and
  2. a single keyword "w". "w" denote "write". This keyword will tell our program to create a file if the file doesn't exist.

The statement <em>open("greeting.txt", "w")</em> will create a text file named "<em>greeting.txt</em>" (Line 1)

To fill up the content in the greeting.txt, we use <em>write()</em> method. Just include the content string as the argument of the <em>write()</em> method. (Line 2)

At last, we use <em>close() </em>method to close the opened file,<em> outfile</em>. This will release the system resource from the<em> outfile.</em>

4 0
2 years ago
Which of the following can be managed using Active Directory Users and Computers snap-in?
Goryan [66]

Answer:

The answer is "Option b".

Explanation:

The active directory can manage the data with active directory customers but a snap-on machine. It is used in scrolling the list, as the earlier replies demonstrate. It will appear on the screen if there is no other startup software installed on a computer.  

This snap-on desktop is only a component, that allows its simultaneous use of different systems or devices on the very same system. It also turns the objects more or less into the pieces of the whole.

7 0
2 years ago
Other questions:
  • Steps in creating a folder
    12·1 answer
  • Two technicians are discussing lung protection in the shop. Technician A says that respiratory-protection devices can prevent yo
    5·2 answers
  • Fill in the blank; "As well as their traditional role of computing data, computers are also extensively used for..."
    14·1 answer
  • The blue bar across the top of the screen informs you of the Screen Title, or what step you are on.
    5·1 answer
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • In this problem, we want to compare the computational performance of symmetric and asymmetric algorithms. Assume a fast public-k
    11·1 answer
  • The PictureBook class is a subclass of the Book class that has one additional attribute: a String variable named illustrator tha
    9·1 answer
  • What is an input to the Program Increment Planning process that highlights how Product Management plans to accomplish the Vision
    15·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!