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
A computer ____ is the amount of data (measured in bits or bytes) that a cpu can manipulate at one time
garik1379 [7]

A computer BIT is the amount of data that a CPU can manipulate at one time.

8 0
3 years ago
Does ripping a dvd erase the original content
kap26 [50]
No, ripping is the process of reading all content in order to make a copy. Nothing is erased.
7 0
3 years ago
G. What are handheld computers? Write its types.​
pav-90 [236]

Answer:

A highly mobile and compact computer, also called a PDA (personal digital assistant), originally built to function as a personal scheduling assistant is called handheld computers.Today, handheld computers frequently provide a convenient connection to the Internet using wireless technology.

industrial portable computers.

portable debarker.

SDIO.

portable VNA.

destinator GPS pocket PC.

medical calculators for pocket PC.

nyse wireless handheld computers.

pu10 pocket PC.

6 0
2 years ago
The short-range two-way communication technology behind contactless payments is called ____.
iogann1982 [59]

Answer:The answer is near field communication.

Explanation:

8 0
1 year ago
Principle of rocket propulsion is based on _​
GalinKa [24]
Answer: Newton’s third law of motion
Explanation: The propulsion of all rockets, jet engines, deflating balloons, and even squids and octopuses is explained by the same physical principle—Newton's third law of motion.
4 0
3 years ago
Other questions:
  • For a color display using 8 bits for each of the primary colors (red, green, blue) per pixel, what should be the minimum size in
    6·1 answer
  • CAPTCHAs can be used as a form of signature to create a valid contract in e-commerce. True False
    6·2 answers
  • Every node (except of the last node) in a singly linked list contains ____
    5·1 answer
  • What is data anayltics
    5·1 answer
  • What icon might you see in device manager that indicates a problem with a device?
    7·1 answer
  • ________________are programs that designed to help users to be more productive with their personal tasks
    11·2 answers
  • A collection of computers and other hardware devices that are connected together to share hardware, software, and data, as well
    15·1 answer
  • The music is the soul who says this
    12·1 answer
  • Hello 10 points if my Chromebook is on 26 percent how much time do I have left theoretically
    8·2 answers
  • Examples in types of experimental methods <br>​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!