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
julia-pushkina [17]
3 years ago
5

Consider this data sequence: "fish bird reptile reptile bird bird bird mammal fish". let's define a singleton to be a data eleme

nt that is not repeated immediately before or after itself in the sequence. so, here there are four singletons (the first appearance of "fish", the first appearance of "bird", "mammal", and the second appearance of "fish"). write some code that uses a loop to read a sequence of words, terminated by the "xxxxx". the code assigns to the variable n the number of singletons that were read. (for example in the above data sequence it would assign 4 to n. assume that n has already been declared . but not initialized . assume that there will be at least one word before the terminating "xxxxx".
Computers and Technology
1 answer:
Ierofanga [76]3 years ago
5 0
N = 0

string temp;
if wordset[0] != wordset[1] then {
    n = n + 1
}
temp = wordset[0]
for i = 1 to wordset.length - 2 do {
    if wordset[i] != temp AND wordset[i] != wordset[i + 1] then {
        n = n + 1
    }
    temp = wordset[i]
 
} 

}
You might be interested in
I am having trouble figuring out if this is correct. Can someone please help me ASAP?
CaHeK987 [17]

Explanation:

The X's have been correctly placed in the chart

A surge suppressor, which is also commonly known as a surge protector, is an important equipment that helps prevent damage to electric components from an unexpected increase of voltage. Let’s assume that you are living in a county where the effective utility voltage is between 110 to 120 volts. Assume that the accepted peak voltage should not be anything higher than 170 volts. If there is a surge and this surge reaches peak levels of 170 volts and higher, surge suppressors should jump in and prevent the peak AC voltage from going above the threshold.

People tend to confuse line conditioners and surge suppressors. While surge suppressors protect components from surges, line conditioners are built to make up for the loss of voltage from the lines. It does so by storing some power energy. This stored energy can later be modified and used when the volts drops to the desired 110 volts.

A UPS has DC battery power that provides battery backup power when the electricity goes off or when the levels of voltage drop significantly. When the electricity goes off means that the voltage is at 0 volts and it is the work of the UPS to kick its backup power in.

6 0
3 years ago
Which of the statements below is false? Question 19 options: a) You can install a 64-bit operating system on a 64-bit machine. b
diamong [38]

you can install a 64 bit operating system on a 32 bit machine.

hope this helps!

5 0
3 years ago
Raul converts numbers in base 10 to base 2. Which answer best defends why Raul would need to do this?
gtnhenbr [62]

Answer:

C

Explanation:

All the calculation by computer is performed in base 2. Base 2 is also named as binary computation and it is used in all the computer and digital data processing processors.

Some differences between base 2 and base 10 are:

  • Base 2 number system contains 0 and 1 whereas base 10 is from 0 to 9.
  • Digital systems works on 0 and 1 logic i.e on and off logic. So we use digital system easily in binary domain whereas, decimal system has 0-9 levels and they are hard to be catered in digital domain.
  • Base 10 is used in normal calculations for daily use and binary is only confined to digital domain.
7 0
3 years ago
What button is used for paragraph alignment on Microsoft 2016?
Margarita [4]
Just click the buttons on the Paragraph tab on Home.
6 0
3 years ago
Janet has to prepare a presentation on business strategies for work. Which guideline should she follow to create an effective pr
Tpy6a [65]

d.....................................


7 0
3 years ago
Read 2 more answers
Other questions:
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    6·1 answer
  • What is binary number
    11·1 answer
  • When forced distribution is used to reduce leniency bias, this can cause __________ if a pfp system is in place?
    10·1 answer
  • What is encyclopedia. Com considered to be?
    14·1 answer
  • A factory producing cables for personal computers finds that its current average
    10·1 answer
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • What is information technology?
    9·1 answer
  • What framework provides a simple API for performing web tasks?
    13·1 answer
  • What is the name of the variable in this code?
    13·2 answers
  • A(n) ____________ calculator is a device that assists in the process of numeric calculations but requires the human operator to
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!