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
Fantom [35]
3 years ago
8

Suppose that the bag class is efficiently implemented with a fixed array with a capacity of 4000, as in Chapter 3 of the class t

ext. We execute these statements: bag b; b.insert(5); b.insert(4); b.insert(6); b.erase_one(5);
Computers and Technology
1 answer:
Phoenix [80]3 years ago
6 0

Answer:

b.used is 2, b.data[0] is 4, b.data[1] is 6

Explanation:

bag b;

b.insert(5); // b has 5

b.insert(4); // b has 5,4

b.insert(6); // b has 5,4,6

b.erase_one(5); // now 5 is removed , b has 4,6

so no:of elements b.used is 2

b[0]=4;

b[1]=6;

You might be interested in
The advancement in speed of transportation is attributed to invention of this device
morpeh [17]
The automobile is the invention
3 0
3 years ago
• Describe the steps in detail that the operating system performs to handle interrupts, including ISRs, the stack, and hardware?
sdas [7]

Answer:

Operating system is the software that is used to control different hardware of computers and handle scheduled tasks.

It also handles the interrupts from some external devices, or from some software. The interrupts are handled through Interrupt service routine. When some external event occurs the following steps has been taken by OS to perform the operation

  1. In first step, an external event has been occurred, and request to the cpu to perform operation.
  2. This request invoke ISR (Interrupt service routine), to perform the operation.
  3. The interrupts are stored in stack on the priority basis.
  4. The CPU performs the operation on Interrupt as per request of ISR.
  5. After Completing operation, CPU return to its initial task.  

5 0
3 years ago
The goal of this project is to become familiar with basic Python data processing and file usage. By the end of this project, stu
xenn [34]

Answer:

Explanation:

The question does not provide any actual data to manipulate or use as input/guidline therefore I have taken the liberty of creating a function for each of the question's points that does what is requested. Each of the functions takes in a list of the needed data such as a list of field test averages for part 1, or a list of field tests for part 2, etc. Finally, returning the requested output back to the user.

import matplotlib.pyplot as plt

from collections import Counter

def best_pilot(field_test_average):

   return max(field_test_average)

def find_average(field_test):

   average = sum(field_test) / len(field_test)

   return average

def create_histogram(field_test_colors):

   count_unique_elements = Counter(field_test_colors).keys()

   plt.hist(field_test_colors, bins=len(count_unique_elements))

   plt.show()

def average_name_lengths(first, last):

   first_name_sum = 0

   last_name_sum = 0

   count = 0

   for name in first:

       first_name_sum += len(name)

       count += 1

   for name in last:

       last_name_sum += len(name)

   first_name_average = first_name_sum / count

   last_name_average = last_name_sum / count

   return first_name_average, last_name_average

7 0
2 years ago
All animations on the world wide web are flash animations
natima [27]

Not every animation on the web is Flash but currently the majority is. There exists simple GIF based animations as well as other technologies for animation such as Silverlight and HTML5. Most believe HTML5 will eventually replace Flash.

6 0
3 years ago
Read 2 more answers
On what menu in Microsoft Word can you locate the Macro feature?
Harrizon [31]

Answer:

View

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users type, format and save text-based documents.

In Microsoft Word 2019, the users are availed with the ability to edit the word document in the following view type;

I. View Mode

II. Print Mode

III. Drift Layout

The Microsoft Word developers has made it easy for their users to automate the tasks used frequently through the creation and execution of macros.

Basically, macros comprises of commands and instructions which may be grouped together as a single command to automatically execute a task. You can locate the Macro feature in the View tab of Microsoft Word.

6 0
3 years ago
Other questions:
  • What operating system allows various teams in its office to network and collaborate on projects
    5·1 answer
  • In Florida, you can drive a motorcycle if you have a _____.
    8·1 answer
  • "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequen
    5·2 answers
  • Which of the following is not true about search engine advertising?
    15·1 answer
  • William found out that someone used his report on American culture without his permission. What is William a victim of?
    8·2 answers
  • A technician has been given a PC that is not powering up. After brief troubleshooting, the technician comes to the conclusion th
    14·1 answer
  • Identify the type of error described
    6·1 answer
  • How does this happen on brianly???
    5·2 answers
  • Consider the following code segment.
    10·1 answer
  • 2. Explain the difference between a JMP instruction and CALL instruction
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!