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
mr_godi [17]
3 years ago
6

Choose the best type of loop for each situation.

Computers and Technology
1 answer:
matrenka [14]3 years ago
7 0

Answer:

1. Option A: for loop is correct

2. Option B: while loop is correct

Explanation:

Two loops are used commonly. For and while

For is used when the number of iterations are already known and while is used when number of iterations is not known and the loop has to be terminated based on any condition.

<u>1. You are finding the batting average of 13 baseball players. </u>

For loop will be used as the number of iterations is already known. The score of 13 players has to be used to calculate the average so there will be 13 iterations. Hence, for loop will be used.

<u>2. You are asking your users for the names of all the stores where they shopped to find their friend's birthday  present. They will show they are done by entering the word "done."</u>

While loop will be used as the termination of loop depends on the input given by the user so the number of iterations are not already known.

Hence,

1. Option A: for loop is correct

2. Option B: while loop is correct

You might be interested in
When summarizing graphs of categorical​ data, report the​ _______ and describe the​ _______?
Alex_Xolod [135]
Hello <span>Rouahidy7821 
</span><span>

Answer: When summarizing graphs of categorical​ data, report the​ models and describe the​ </span><span>variability. 
</span>
Hope this helps
-Chris
7 0
4 years ago
Write the definition of a void function that takes as input an integer and outputs two times the number if it is even; otherwise
KatRina [158]

Answer:

Written in C++

void number(int n){

if(n%2 == 0)

cout<<2 * n;

else

cout<<5 * n;

}

Explanation:

The programming language is not stated.

However, I answered using C++

This line defines the function as void

void number(int n){

This line checks if the number is even

if(n%2 == 0)

If yes, it doubles the number and prints the output

cout<<2 * n;

If otherwise,

else

It multiplies the number by 5 and prints the output

cout<<5 * n;

}

To call the function from main, use:

number(n);

Note than n must be declared as integer

See attachment

Download cpp
6 0
3 years ago
Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
mel-nik [20]

Answer: billboard

Explanation:

Plato answer

8 0
3 years ago
The name atari comes from what
algol [13]

Answer:

JAPANESE

Explanation:

Have a nice day:)

3 0
3 years ago
Hayne is starting his own business as a psychotherapist and needs to post a website advertising his services,contact information
irina1246 [14]

The kind of website which would best suit Hayne's needs is a: C) Dynamic website.

A website is the collective name that is used to describe series of interconnected webpages having a unique domain name.

Basically, a website is an HTML document which comprises codes, tags, images, audios, and videos that are integrated to make them responsive and interactive with clients (end users).

In Computer and Technology, there are four (4) main types of website and these include:

  • Static website.
  • E-commerce website.
  • Scripted website.
  • Dynamic website.

A dynamic website is a type of website which is designed to contain information that automatically changes based on the client, time zone, time of the day, language, services, and other factors.

In this scenario, the kind of website which would best suit Hayne's needs is a dynamic website because his services, tips or contact information may change.

Read more: brainly.com/question/21694571

7 0
3 years ago
Other questions:
  • True or false the primary advantage of the worksheet is the ability to solve numerical problems quickly and accurately
    11·1 answer
  • Esther has acquired an associate's degree in information technology and certifications in PageMaker and Illustrator. Which caree
    8·2 answers
  • Xml is used to format the structure and style of a web page. true or false
    7·1 answer
  • Similarities between human and computer​
    12·1 answer
  • Enter a formula using a database function to calculate the total value in the Cost column for expenses that meet the criteria in
    12·1 answer
  • Translation of a file into a coded format that occupies less space than the original file is called
    15·1 answer
  • Which describes the hypothesis of an experiment? the variable changed by the experimenter/ the quantity that must remain constan
    9·1 answer
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • write an expression taht evaluated to true if and only if the variable s does not contain the string 'end'
    12·1 answer
  • PA theme is a major message that a writer convoys through a text. you have explored many themes in the hobbit one theme in the n
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!