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
kotegsom [21]
3 years ago
15

write a function that returns a list, where each member of list contains previous day’s value multiplied by 2.​

Computers and Technology
1 answer:
sergeinik [125]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java, the function takes in a list with the previous day's values. The function then uses that list, loops through it and multiplies each individual value by 2 and returns the modified list. The first red  square represents the test case for the function, while the second red square in the image represents the output.

 public static ArrayList<Integer> doubleIt(ArrayList<Integer> mylist) {

       for (int x = 0; x<mylist.size(); x++) {

           mylist.set(x, mylist.get(x)*2);

       }

       return mylist;

   }

You might be interested in
Which condition will cause the statement block of the if statement to execute only when count is 0?
maxonik [38]

Only when the count is 0 will the if statement's statement block be executed because of the if count == 0 condition.

<h3>What is an if statement?</h3>
  • A program is guided to make decisions based on predetermined criteria using the IF statement, which is a decision-making statement.
  • If a certain condition is satisfied (TRUE), one piece of code is run, and if it is not, another set of code is run, and so on.
  • A conditional statement, also called a conditional expression, conditional flow statement, or conditional processing, is a set of guidelines that are followed when a specific condition is satisfied.
  • Because IF a condition is satisfied, THEN an action is taken, it is sometimes referred to as an If-Then statement.

To learn more about if statement, refer to:

brainly.com/question/18736215

#SPJ4

4 0
2 years ago
Which of the following is most likely to own the data resulting from a research project?
fomenos

Answer:

Option C i.e., ODS/Data warehouse is the correct answer.

Explanation:

The following option is correct because ODS/Data warehouse owns that resulting data from that project which is related to research. ODS transfer the data of the database to the data warehouses before processing that data or information in the database which is collected from the different-different sources

4 0
3 years ago
John is selling his pizza for $6 per slice in an area of high demand. However, customers are not buying his pizza.
lesya692 [45]
I think John could lower the price of his pizza. He could also put out advertisements. One more thing John could do is increase options for people to customize their pizza.

7 0
3 years ago
Read 2 more answers
How much does james goodnight make per hour
julsineya [31]

Answer:

4$

Explanation:

7 0
3 years ago
What are the values of A[K] and A[K+1] after code correspopnding to the following pseudocode is run?
Black_prince [1.1K]

Answer:

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

Explanation:

The given pseudocode appears to be applied on an array.

Let us look at the given pseudocode one by one

A[K] = 10;

This line of code assigns value 10 to the position A[K] in array

A[K+1] = 20;

This line of code assigns value 20 to the position A[K+1]

A[K] = A[K+1];

This line will assign the value at A[K+1] to A[K] which means value 20 will be assigned to A[K]

so after this line A[K] = 20

A[K+1 ] = A[K];

This line will assign the value in A[K] to A[K+1] as A[K+1] has the value 20 currently so

A[K+1] = 20

Hence,

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

5 0
3 years ago
Read 2 more answers
Other questions:
  • Ideation includes all of the following EXCEPT
    5·1 answer
  • A user is given Read permission to a file stored on an NTFS-formatted volume. The file is then moved to a different folder on a
    5·1 answer
  • What is the default file extension for a document created in Word 2016​
    13·1 answer
  • How does a scriptwriter show the design team how different player actions should affect the game?
    6·1 answer
  • Does anyone know about the progressive era?
    15·2 answers
  • Discuss at least two challenges students face when conducting research on the Internet.
    7·2 answers
  • What do you believe is the future of certification?
    7·1 answer
  • PLS HELPPPPPP According to O*NET, what are the three most common levels of education earned by Clergy?
    14·2 answers
  • Testing components for satellites is a classic example of
    13·1 answer
  • What should the Dhruv consider when connecting to the Internet in a public place? Select all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!