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
kolbaska11 [484]
3 years ago
11

When a function needs access to an original argument passed to it, for example in order to change its value, the argument needs

to be
Computers and Technology
1 answer:
notsponge [240]3 years ago
3 0

Answer:

See explanation

Explanation:

The question would be best answered if there are list of options.

However, the question is still answerable.

When there's a need to change the value of the argument passed into a function, what you do is that you first pass the argument into a parameter, then you change the value.

Take for instance, the following code segment:.

int changeArg(int n){

int newhange = n;

newhange++;

return newhange;

}

The above takes in n as the argument

Then it passes the value of n into a reference parameter, newchange

And lastly, the value is altered.

You might be interested in
The parallax perspective says that objects that are close up appear to move __________ than far away objects.
serious [3.7K]

Answer:

It appears to move faster.

5 0
3 years ago
The software used to help run the computer hardware is the _____.
TiliK225 [7]
C. system software
if it means drivers and so on
6 0
3 years ago
Read 2 more answers
A _____ is an electronic path over which data can travel.
vazorg [7]
A bus is an electrical path which data travels between the different components in an electronic device.                                                                      
5 0
3 years ago
Q1). Write a python program to pass a list to a function and double the odd values and half even values of a list and display li
zepelin [54]

Answer:

\textsf{\large{\underline{Solution}:}}

The given problem is solved using language - Python.

def f(x):

   new_list=[]

   for i in x:

       if i%2==0:

           new_list.append(i//2)

       else:

           new_list.append(i*2)

   return new_list

   

my_list=list(range(1,6))

print('Original List:',my_list)

my_list=f(my_list)

print('Modified List:',my_list)

\textsf{\large{\underline{Logic}:}}

  1. Create a new list.
  2. Iterate over the list passed into the function.
  3. Check if the element is even or not. If true, append half the value of element in the list.
  4. If false, append twice the value of the element in the list.
  5. At last, return the new list.

There is another way of doing this - By using map() function.

—————————————————————————————

def f(x):

   return list(map(lambda x:x//2 if x%2==0 else 2*x,x))

   

my_list=list(range(1,6))

print('Original List:',my_list)

my_list=f(2my_list)

print('Modified List:',my_list)

—————————————————————————————

\textsf{\large{\underline{O{u}tput}:}}

Original List: [1, 2, 3, 4, 5]

Modified List: [2, 1, 6, 2, 10]

8 0
3 years ago
Which of the following best describes the displayport interface used for connecting video monitors to computers
Lesechka [4]

Answer:

Displayport uses a lower voltage than DVI and HDMI.

Explanation:

DisplayPort are cables and connector used to stream video, audio, usb or other kinds of data to the monitor screen of a computer. As defined, it can send video and audio signals on the same cable, over a long distance at a high speed.

The voltage requirement for DisplayPort is 3.3 volts while HDMI and DVI uses 5 volts.

3 0
3 years ago
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • Question 5
    5·1 answer
  • You are provisioning a server with eight-core 3 GHz CMP that can execute a workload with an overall CPI of 2.0 (assuming that L2
    5·1 answer
  • A _____ is a device that not only provides surge protection, but also furnishes desktop computers and network devices with batte
    7·1 answer
  • A computer’s memory is composed of 8K words of 32 bits each. How many bits are required for memory addressing if the smallest ad
    10·1 answer
  • Directory servers from different vendors are synchronized through ________.
    9·1 answer
  • The goal expressed in this definition states that data visualization is about ________________ .
    11·2 answers
  • Which type of NAC agent will be used during the posture assessment before allowing access to the VPN users?
    9·1 answer
  • Which tab do you select to change how you see your Word document on screen?
    9·2 answers
  • PYTHON HW PLEASE HELP. I NEED THE ACTUAL CODE!!! 100 POINTS AND BRAINLIEST. REPORTING IF YOU DON'T ANSWER
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!