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
kkurt [141]
2 years ago
12

A condition-controlled loop uses a while loop. true false

Computers and Technology
1 answer:
matrenka [14]2 years ago
8 0

Answer:

true

Explanation:

a while loop is a condition-controlled loop. While loops continue no matter what under a certain condition, unless you insert the keyword <em>break.</em>

One example in python is this:

while x > y:

      <em>pass</em>

The keyword to break a while loop may vary depending on the coding language you are using.

<u>Tip</u> The pass keyword allows a no error contact between loop and the terminal. Pass in a nutshell is almost as if saying nothing at all, but just leaving the condition blank. We only use pass because it prevents errors instead of no value.

You might be interested in
Hit and Slopes Program: A Write a program that can be used by a ski resort to keep track if local snow conditions for one week.
Llana [10]

Answer:

The java program is as follows.  

import java.lang.*;  

import java.util.Scanner;  

public class Main  

{  

//array declaration  

static int weekdays=7;  

static int[] snowfall_inch = new int[weekdays];  

static String[] snowfall_date = new String[weekdays];  

//variables to store average and maximum  

static double avg;  

static int max;  

public static void main(String[] args) {  

Scanner sc = new Scanner(System.in);  

System.out.print("Enter the month: ");  

String month = sc.next();  

for(int n=0; n<weekdays; n++)  

{  

System.out.print("\nEnter the date for day "+(n+1)+ ": ");  

snowfall_date[n] = sc.next();  

System.out.print("Enter the inches of snowfall for day "+(n+1) +": ");  

snowfall_inch[n] = sc.nextInt();  

avg = avg + snowfall_inch[n];  

}  

avg = avg/weekdays;  

System.out.printf("The average snowfall for the week is %.4f",avg);  

for(int n=0; n<weekdays-1; n++)  

{  

if(snowfall_inch[n] < snowfall_inch[n+1])  

max=snowfall_inch[n+1];  

}  

System.out.println("\nThe maximum snowfall for the week is "+max);  

}  

}  

OUTPUT  

Enter the date for day 2: 12-2-2019

Enter the inches of snowfall for day 2: 23  

Enter the date for day 3: 12-3-2019

Enter the inches of snowfall for day 3: 13  

Enter the date for day 4: 12-4-2019

Enter the inches of snowfall for day 4: 14  

Enter the date for day 5: 12-5-2019

Enter the inches of snowfall for day 5: 34  

Enter the date for day 6: 12-6-2019

Enter the inches of snowfall for day 6: 34  

Enter the date for day 7: 12-7-2019

Enter the inches of snowfall for day 7: 22

The average snowfall for the week is 21.7143  

The maximum snowfall for the week is 34  

Explanation:

1. Two arrays are declared to store dates and snowfall inches with string and integer datatypes respectively.  

2. Variables are declared to store maximum and average snowfall values with integer and double datatypes respectively.  

3. User input is taken for the month, and the dates and snowfall inch values for a week. The input is taken in for loop.  

4. Next, for loop is used to find the average and maximum snowfall of the week.  

5. These values are displayed to the user as shown in the output.

5 0
3 years ago
.in the array based list implementation of the ADT what is the worst case time efficiency of the getEntry method?
kenny6666 [7]

Answer:

c.O(n)

Explanation:

In the array based list implementation of the ADT the worst case time complexity of the getEntry method is O(n).In the worst case it has to travel upto n elements then it has to do the operation.In doing so  the time complexity will come out to be O(n).So we conclude that the answer to this question is O(n).

5 0
3 years ago
What is the WiFi signal strength in different iPhone models?
Anika [276]
This is a really good question! WiFi signal strengths depend on the model of the WiFi receiver (which is in the iPhone) and the quality of the router sending out the signals.
8 0
3 years ago
Compare and contrast system software and generalised software
jekas [21]
System software is a type of computer program that is designed to run a computer’s hardware and application programs.
Generalized software refers to software designed to read, process and write data with the help of functions performing specific audit routines and with self-made macros.
3 0
3 years ago
. How to insert Section Break in Microsoft word 2016 ?
aivan3 [116]

Answer:

C. Layout Tab – Page setup group – Breaks – Next page button.

3 0
3 years ago
Other questions:
  • Food is shipped thousands of miles throughout our country using various types of transportation such as trucks, planes, and boat
    10·1 answer
  • Which of the following is NOT a group on the Slide Master tab?
    6·1 answer
  • How does microchip work
    12·1 answer
  • WHICH OF THE FOLLOWING LOOKS JUST LIKE A CD ROM BUT CAN STORE MUCH MORE INFORMATION
    8·2 answers
  • In general terms, a program that is broken into smaller units of code such as methods, is known as a ________
    6·1 answer
  • The data in a data warehouse have which of the following characteristics?
    12·1 answer
  • Drag each label to the correct location on the image.
    10·1 answer
  • Which mark is an indicator of invalid data in a cell?
    11·1 answer
  • With which feature or menu option of a word processing program can you make an image like this?
    14·2 answers
  • Const x = 0;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!