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
hammer [34]
2 years ago
9

Given a one-dimensional array named yearlySalesTotals that contains decimal values, code the first line of a for statement that

declares an index, a Boolean expression for ending the for loop, and an increment expression that lets you use the index to refer to each element in the array.
Computers and Technology
1 answer:
VashaNatasha [74]2 years ago
7 0

Answer:

for(int i =0; i<yearlySalesTotals.length;i++)

Explanation:

The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.

See below a complete program in java that will output all elements of the array  assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.

public class ANot {

   public static void main(String[] args) {

double []yearlySalesTotals = new double[10];

for(int i = 0; i<yearlySalesTotals.length; i++){

   System.out.println(yearlySalesTotals[i]);

   }

}

}

You might be interested in
In many DBMSs where no strict separation of levels is maintained, this one language is used by the DBA and database designers to
marissa [1.9K]

Answer: False

Explanation:

This means that the mappings between the two schemas may be specified in either one of these languages.In most relational DBMSs today, there is no specific language that performs the role of SDL. Instead, the internal schema is specified by a combination of functions, parameters, and specifications related to storage. These permit the DBA staff to control indexing choices and mapping of data to storage

5 0
2 years ago
Which best describes the benefits of renting a home?
WARRIOR [948]
The benefits are that you don't have to worry if something breaks from like a water leake or a storm and get destroyed the home owners have to pay
7 0
3 years ago
Read 2 more answers
Read_data Define a function named read_data with two parameters. The first parameter will be a csv reader object (e.g., the valu
Sav [38]

Answer:

Check the explanation

Explanation:

Given below is the code for the question. PLEASE MAKE SURE INDENTATION IS EXACTLY AS SHOWN IN IMAGE.

import csv

def read_data(csv_r, keys):

  data = []

  for row in csv_r:

      mydict = {}

      for i in range(len(keys)):

          mydict[keys[i]] = row[i]

      data.append(mydict)

  return data

SCREENSHOT:

8 0
2 years ago
Sub to splashy
tatyana61 [14]
Ok well make that 19 now
7 0
2 years ago
Read 2 more answers
Ask the user to enter a number for red, green, and blue components of an RGB value. Test to make sure each value is between 0 an
olganol [36]

Answer:

  1. r = int(input("Enter a number for red channel: "))
  2. g = int(input("Enter a number for green channel: "))
  3. b = int(input("Enter a number for blue channel: "))  
  4. if(r < 0 or r >255):
  5.    print("Red number is not correct.")
  6. if(g < 0 or g >255):
  7.    print("Green number is not correct.")
  8. if(b < 0 or b >255):
  9.    print("Blue number is not correct.")

Explanation:

The solution code is written in Python.

Firstly, prompt user to input three numbers for red, green and blue (Line 1-3).

Next, create three similar if statements to check if the red, green and blue are within the range 0-255 by using logical operator "or" to check if the number is smaller than 0 or bigger than 255. If either one condition is met, display a message to indicate a particular color number is not correct (Line 5-12).

3 0
3 years ago
Other questions:
  • Mass production usually uses an _______________ ____________ or production line technique.
    7·1 answer
  • List some good names for devices on your home network or on the network in your school's lab. Demonstrate the use of best practi
    13·1 answer
  • To create a formula in______, you would first click in one of the cells​
    14·2 answers
  • Lexi wants to buy a $300 painting. when she gets to the store, she finds that it is on sale for 40% off. how much does Lexi spen
    10·1 answer
  • ____ is the only automated disk-to-disk tool that allows you to copy data to a slightly smaller target drive than the original s
    5·1 answer
  • Create a dictionary password cracker or a brute force
    13·1 answer
  • Technical term of stealing personal information in social media.​
    5·1 answer
  • 1. Who was able to complete the puzzle the fastest in Trial 1?
    15·1 answer
  • Help!! Best answer will get Brainliest!!
    10·2 answers
  • Distinguish<br> between formal and Informal<br> Information System<br> Information systems
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!