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
The ____ is a well-established organization with a primary emphasis on computer science. a. International Standards Organization
Pavlova-9 [17]

Answer:

c.

Explanation:

Based on the information provided within the question it can be said that the organization that is being mentioned is called the The Association for Computing Machinery (ACM). This association was founded in 1947 is the largest computing society in the world, with it's main focus being on computer science and education.

3 0
4 years ago
Wrire a code that display elements at indices 1 and 4 in the follwoing array.
Sveta_85 [38]

Answer:

Console.log(userArray[1]);

Console.log(userArray[4]);

Explanation:

The programming language was not stated; however, the variable declaration implies JavaScript.

JavaScript prints using the following syntax:

Console.log(print-name);

Since, the code is to print some elements of array userArray.

First, we need to determine the index of the elements.

The indices are given as 1 and 4.

So, the code to print these elements is as follows:

Console.log(userArray[1]);

Console.log(userArray[4]);

8 0
3 years ago
10. Calculate the checksum for blocks of data with the following byte sum. (a) 1220 (b) 950​
OLga [1]

Answer:kalo gk salah yang

a

Explanation:

5 0
3 years ago
Why is Data-Driven Analytics of interest to companies?
vivado [14]

Answer:

It allows companies to make definitive predictions about the future. It gives companies the ability to make informed decisions.

It helps Data Analysts shape an analytics problem from a business problem.

Explanation:

4 0
3 years ago
a program p takes time proportional to log where nlogn is the input size. if the program takes 100 ms to process input of size 1
Eddi Din [679]

Answer:

The time is 4 \times 10^7 \ microseconds.

Explanation:

\ The \ requires \ time \ be \ t \ microseconds, \\\\\ \ formula: \\\\ time \propto \ nlog_n \Rightarrow \ time \ = \ knlogn \\\\

\ 10 \ = \ 100 \ log(100) \ \ \ \ \ \ \ \ \ k= 10^2 \ log\ ( \ 10^2\ ) \ k\\\\t=100,000,000 \log \ ( \ 100,000,000\ ) \ k = \ 10^8 \ log\ (\ 10^8\ )\ k \\\\\rightarrow \frac{t}{10} \ =\frac{10^8\ log \ (10^8)k}{10^2\ log\(10^2\ ) k} \\\\\rightarrow \frac{t}{10} \ =\frac{10^8\ log \ (10)\times 8 \times k}{10^2\ log\(10) \times 2 k} \\\\\rightarrow \frac{t}{10} \ =\ 4\times 10^6\\\\\rightarrow \ t \ =\ 4\times 10^6 \times 10 \\\\\rightarrow \ t \ =\ 4\times 10^7 \ microseconds \\\\

3 0
4 years ago
Other questions:
  • As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
    14·1 answer
  • Suppose there is a class Roster. Roster has one variable, roster, which is a List of tuples containing the names of students and
    6·1 answer
  • What engine component is shown in the above Figure?
    14·2 answers
  • in a management information system, the quality of information is determined by its usefulness to users, and its usefulness dete
    8·1 answer
  • What is the first step necessary to begin setting up a website once a host has been selected and paid?
    11·1 answer
  • Stuart wants to delete some text from a slide. What should Stuart do?
    8·1 answer
  • What has happened (or is still happening) to make this speech occur? armageddon
    15·1 answer
  • Every presentation should have a beginning, a middle, and an end.
    10·1 answer
  • What is a functional organisation? and how it functions​?
    12·1 answer
  • Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!