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
elixir [45]
3 years ago
14

Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates wh

en "xxxxx" (five x characters) is read in. Other strings are ignored. After the loop, your code should print out 3 lines: the first consisting of the string "land:" followed by the number of "land" strings read in, the second consisting of the string "air:" followed by the number of "air" strings read in, and the third consisting of the string "water:" followed by the number of "water" strings read in. Each of these should be printed on a separate line. Use the up or down arrow keys to change the height.
Computers and Technology
1 answer:
____ [38]3 years ago
4 0

Answer:

count_land = count_air = count_water = 0

while True:

   s = input("Enter a string: ")

   if s == "xxxxx":

       break

   else:

       if s == "land":

           count_land += 1

       elif s == "air":

           count_air += 1

       elif s == "water":

           count_water += 1

print("land: " + str(count_land))

print("air: " + str(count_air))

print("water: " + str(count_water))

Explanation:

*The code is in Python

Initialize the variables

Create a while loop that iterates until a specific condition is met. Inside the loop, ask the user to enter the string. If it is "xxxxx", stop the loop. Otherwise, check if it is "land", "air", or "water". If it is one of the given strings, increment its counter by 1

When the loop is done, print the number of strings entered in the required format

You might be interested in
Which subscription service complements App-ID by enabling you to configure the next-generation firewall to identify and control
Nataly [62]

The subscription service that complements App-ID by enabling you to configure the firewall to identify and control access to websites is  URL Filtering.

<h3>What is URL filtering?</h3>

The term URL filtering is known to function by looking at the similarities of all web traffic against a given URL filters.

Note that it is one that is made up of database of sites that users do access and as such, the subscription service that complements App-ID by enabling you to configure the firewall to identify and control access to websites is  URL Filtering.

Learn more about subscription from

brainly.com/question/14073216

#SPJ1

4 0
2 years ago
If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
Mkey [24]

Answer:

A.1.

Explanation:

CCS(Centum Call Seconds) is a unit to measure the network traffic in the telecommunication circuit network.        

1 Traffic unit = 1 Erlang.      

The relation between Erlang and CCS(Centum Call Seconds) is:-

36 CCS = 1 Erlang.          

Hence the answer to this question is 1 Erlang.

5 0
3 years ago
Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne
trasher [3.6K]

Answer:

printStars(35);

Explanation:

public class Question {

   public static void main(String args[]) {

     printStars(35);

   }

   public static void printStars(int numberOfStars){

       for(int i = 1; i <= numberOfStars; i++){

           System.out.print("*");

       }

       System.out.print("\n");

   }

}

7 0
3 years ago
What is the computer generation​
Inga [223]

Answer:

Generations of Computers Generation in computer terminology is a change in technology a computer is/was being used. Initially, the generation term was used to distinguish between varying hardware technologies. Nowadays, generation includes both hardware and software, which together make up an entire computer system.

3 0
3 years ago
If you get musicilly can your parents see
Tresset [83]
I wouldn't think so unless they have access to your phone or account. But I don't believe this is school related.
6 0
4 years ago
Read 2 more answers
Other questions:
  • A(n) ____ tag is used to let the compiler know that your intention is to override a method in a parent class
    10·1 answer
  • What is the formula for calculating the average of cells<br> C2 through C30?
    15·1 answer
  • What can search the internet and select elements based on important words
    10·1 answer
  • Enna always says thank you when people give her gifts. She even writes thank-you cards. On holidays, Enna remembers
    9·1 answer
  • Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is
    14·1 answer
  • "What is the capital of Belarus?" is an example of what type of search query
    10·2 answers
  • which program monitors the computer by looking for known trouble makers as well as suspicious behavior​
    11·1 answer
  • On start up, which of these windows is not displayed ?
    15·2 answers
  • What will the computer do in response to a line of code reading # name = input("What is your name?")
    7·1 answer
  • I have a problem. I can't cycle between game packs on my strike pack, I've watched so many vids I'm on Xböx and I'm holding the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!