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
Using the notation exemplified in following question , list a set of tables and attributes (and identify keys) to represent the
Paha777 [63]

Answer:

Entities are - Students, CourseList, Advisor and CourseSelection.

Explanation:

The database is structure is designed using Crow Foot Database Notation as attached

6 0
3 years ago
A manufacturer of machine tools creates a spreadsheet of tools and the cost for those. The spreadsheet has four fields: name of
iragen [17]

The question above has multiple answers:


<span>1.       </span>Sort the data in the field "name of the tool" in ascending order alphabetically.

<span>2.       </span> Sort the data in the field “number of tools” in ascending order.

<span>3.       </span>Sort the data in ascending order of cost per tool.

<span>4.       </span>Sort the data in ascending order of total cost.

The answer is 3. Sort the data in ascending order of cost per tool


You can always make your spreadsheet work a bit more organized by sorting your data. In this case, what is required from the manufacturer of the tools is to sort the data so that someone else is able to find out which tool costs the most. Basically, the price of the tool which is the highest is required to be known. Therefore, the manufacturer of the tools should Sort the data in ascending order of cost per tool.






3 0
3 years ago
¿que significa “TTAQMMQMPDATLSPLNDTMGCCLFEQMMPQTEIUMDR” ?
OlgaM077 [116]

Answer: what

Explanation:

5 0
2 years ago
Read 2 more answers
look at sum of my horrible drawings lol these were last year XD let meh see sum of yalls art!! im not into drawing as much but i
Snowcat [4.5K]

Answer:

Explanation:

but i drew eyes like your but digtal

5 0
2 years ago
Your computer has two basic types of software: system software and ________ software.
Elan Coil [88]
Hi!

Our computers will have system software and application software. Application software would be something like a game or just any general purpose app you've downloaded.

Hopefully, this helps! =)
5 0
3 years ago
Other questions:
  • Write a Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer. Use a c
    12·1 answer
  • The ________ phase in a project involves documenting lessons learned from the project, so that the experience is useful to other
    13·1 answer
  • Hen using presentation software, what do you do when you "compose a slide"?
    5·1 answer
  • 2. Which of the following best describes the protocols used on the Internet?
    15·1 answer
  • After a chart has been inserted and formatted, is it possible to change the data range it refers to or to add new rows of data?
    14·1 answer
  • B) If you send me an email, then I will finish my program. If you do not send me an email, then I will go to sleep early. Theref
    10·1 answer
  • Read the following sentence from an argumentative essay.
    11·1 answer
  • A function is executed when it is
    7·1 answer
  • Write Epic username plz
    6·1 answer
  • Finish the format string to get the output shown below.<br> Day<br> &gt;&gt;&gt;{ v8'_format('Day)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!