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
JulijaS [17]
4 years ago
8

Implement a sorting algorithm and sort the vocab array (found below) alphabetically. For this question, do not define or use an

explicit swap function (you will revisit this in question 3). Print the vocab array before and after it is sorted. Vocab = [ "Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]
Computers and Technology
1 answer:
Stolb23 [73]4 years ago
3 0

Answer:

vocab = [ "Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]

print(vocab)

needNextPass = True

k = 1

#list = [x.lower() for x in list]

while k < len(vocab)-1 and needNextPass:

   # List may be sorted and next pass not needed

   needNextPass = False

   for i in range(len(vocab) - k):

       if vocab[i] > vocab[i + 1]:

           # swap list[i] with list[i + 1]

           temp = vocab[i]

           vocab[i] = vocab[i + 1]

           vocab[i + 1] = temp

           needNextPass = True  # Next pass still needed

print(vocab)

Explanation:

I hope this helps you!

You might be interested in
Which of the four control methods is best suited for transfer of large blocks of data?
mihalych1998 [28]

Answer:

3

Explanation:

3 0
3 years ago
While using a web-based order form, an attacker enters an unusually large value in the Quantity field. The value he or she enter
Darina [25.2K]

Answer:

Implementing client side validation

Explanation:

Given that this type of attack is known as Integer Overflow, the best means or practices to prevent this kind of attack is " implementing client-side validation."

This is because implementing client-side validation assists to prevent the validation errors that will arise from the integer overflow thereby resulting in a reduction of the network and server load.

Hence, in this case, the correct answer is "Implementing the client-side validation."

4 0
3 years ago
What are three ways a person may use a computer without realizing it?
Elodia [21]

Answer:

D

It's technically a computer and some people may not realize it.

5 0
3 years ago
PLS HURRY!! This OS introduced a very cool GUI that had animations and transparencies.
Mumz [18]

Answer:

I think Windows 98 or XP it's one of those

Explanation:

6 0
3 years ago
You are the IT security administrator for a small corporate network. The HR director is concerned that an employee is doing some
sp2606 [1]

Answer: A, it's the most professional way or C but I'd choose A

7 0
2 years ago
Other questions:
  • Writers should avoid jargon because jargon ______. a. Takes too long to use b. Limits what ideas can be explored c. Conveys too
    12·1 answer
  • Sara has a habit of stealing money from her brother Charlie. When he found out, Charlie rebuked Sara in the presence of his frie
    11·1 answer
  • Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one.
    11·1 answer
  • Write a program segment with a do-while loop that displays whether a user-entered integer is even or odd. The code should then a
    5·1 answer
  • Who can provide you with a new password when you have forgotten your old one?
    14·2 answers
  • Monica spent a lot of time preparing for her interview, but the hiring manager is not asking any of the questions she practiced.
    9·2 answers
  • Microsoft windows malicious software removal tool fake or real
    8·1 answer
  • Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields
    12·1 answer
  • You are the IT administrator for a small corporate network. The employee in Office 2 is setting up a virtualization environment
    10·1 answer
  • Each high-level language has its own __________, or rules of the language. group of answer choices
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!