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
DerKrebs [107]
4 years ago
13

Define a function below called increase_elements_by_x, which takes two arguments - a list of numbers and a single positive numbe

r (you might want to call it x). Complete the function such that it returns a copy of the original list where every value is increased by the second argument. For example, given the inputs [1,2,5] and 2, your function should return [3,4,7].
Computers and Technology
1 answer:
zubka84 [21]4 years ago
5 0

Answer:

function

increase_elements_by_x (list, x)

{

 var tplist = [];

 for (i = 0; i < list.length; i++)

   {

     tplist[i] = list[i] + x;

   print (tplist[i])}

 return tplist;

}

var list =[1, 3, 5];

var copyList;

var x = 3;

copyList = increase_elements_by_x (list, x);

print (copyList);

Explanation:

Create a list named list with initial data 1,3,5.

Create a function name increase_elements_by_x  which takes list and number as argument.Create empty list tplist. Loop through list, for ever index add x to list[index] and save to an empty list tplist. After loop is exited return tplist.

create a variable copylist and set it to increase_elements_by_x. Value returned by increase_elements_by_x  will be saved in copylist. print copy list to see content of copy list.

You might be interested in
We can save our data peremently on a
riadik2000 [5.3K]

Answer:

modem

Explanation:

hope it helps

4 0
3 years ago
Read 2 more answers
___ is the branch of computer science that explores techniques for incorporating aspects of intelligence into computer systems.
mamaluj [8]
Artificial Intelligence
5 0
3 years ago
A picture in electronic form<br> h
Marysya12 [62]

Answer:

Image editing software. refers to computer programs that allow you to create and modify digital images, or pictures in the electronic form. Digital images.

5 0
3 years ago
What are the most common types of tasks performed by utility programs? accessibility
denis23 [38]
The most common type of task performed by utility program is the file management. The utility program is a program created to help computer users in managing, optimizing, and configuring the computer. Every newly purchased computer has a file managing program to help users for setting the computer up for its personal use. Therefore, file managing is the most common utility program.
6 0
4 years ago
____ refers to driving around an area with a Wi-Fi-enabled device to find a Wi-Fi network in order to access and use it without
777dan777 [17]

 Answer:War driving

Explanation: War driving is the activity which is done for searching for the Wi-Fi connection while driving vehicle .The main purpose of the war driving is gaining and accessing the network of Wi-Fi by being in slowly moving vehicle. The act is carried out by the individual or more people.

Other options are incorrect because Wifi driving and Wifi finding are not technical words in the computer field and E-stalking is the stacking activity with the help of internet enables electronic devices.Thus, the correct option is war driving.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Data are sent through a network on bundles called ____packets____. select one:
    14·2 answers
  • Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has
    9·1 answer
  • Which one is a certain sign that a website is not reliable?
    6·2 answers
  • Guys please join this link... I want friends...
    7·2 answers
  • Write a C program (doublecopy) that allows a user to extract some part of an existing file (fileSource) and copy it twice to a n
    5·1 answer
  • What is the most likely reason that a digital artist would use a program such as Autodesk Maya or Max to create 3-D images for a
    12·1 answer
  • Write a program that prompts the user to enter an oligonucleotide sequence, such as TATGAGCCCGTA.
    7·1 answer
  • A data table is a range that displays what?
    15·2 answers
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
  • Write a function named partfthat takes inas parameterstwo parallel lists: a list of times (in increasing order), and a list of d
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!