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
Aleks [24]
3 years ago
14

10. Write a function called replace_elem that takes an array and two values and uses the simple search

Computers and Technology
1 answer:
zalisa [80]3 years ago
8 0

The function that replaces the values in an array is as follows:

def replace_elem(a, integer1, integer2):

    for i in range(len(a)):

         if a[i] == integer1:

              a[i] = integer2

    return a

print(replace_elem([7, 4, 10, 3, 7, 2, 4, 5], 4, 6))

<h3>Code explanation.</h3>

The code is written in python.

  • We defined a function named "replace_elem". The function accepts an array a, and integers integer1 and integer2.
  • Then, we used a loop to loop the index of the array.
  • If any of the index value is equals to the integer1, we replace it with integer2.
  • Then return the new values of the array a.
  • Finally, we call the function with its parameters.

learn more on function here: brainly.com/question/15691123

You might be interested in
A(n) ________ is a server-based operating system oriented to computer networking and may include directory services, network man
Ganezh [65]

Answer:

Network Operating System (NOS)

Explanation:

A network operating system (NOS) is an operating system that makes different computer devices connect to a common network in order to communicate and share resources with each other using a server. A network operating system can be used by printers, computers, file sever among others, and they are connected together using a local area network. This local area network which they are connected to works as the server.

The NOS also acts as a network security because it could be used as an access control or even user authentication.

There are two types of NOS

1) Peer to peer network operating system.

2) Client/server network operating system

A network operating system (NOS) is a server-based operating system oriented to computer networking and may include directory services, network management, network monitoring, network policies, user group management, network security, and other network-related functions.

4 0
3 years ago
A thermogram taken outside a house shows high amounts of thermal energy around the windows but not around the roof. which conclu
mestny [16]

The conclusion sustains the thermogram will be that the windows are not energy efficient, but the roof stands energy efficient.

<h3>What is Thermography?</h3>

Thermography exists a noninvasive method that employs an infrared camera to develop pictures that depict patterns of heat and blood flow on or around the body's surface. A thermogram taken outside a house shows high quantities of thermal energy around the windows but not around the roof. The conclusion that supports the thermogram will be that the windows are not energy efficient, but the roof exists energy efficient.

Thermal energy (also named heat energy) is produced when a rise in temperature pushes atoms and molecules to move faster and collide with each other. The energy that reaches the temperature of the heated substance is named thermal energy. The term "thermal energy" exists utilized loosely in various contexts in physics and engineering. It can guide several different well-defined physical concepts.

To learn more about Thermography refer to:

brainly.com/question/1500896

#SPJ4

The complete question is,

A thermogram taken outside a house shows high amounts of thermal energy around the windows but not around the roof.

Which conclusion supports the thermogram?

The windows and the roof are energy efficient.

The windows and the roof are not energy efficient.

The windows are not energy efficient, but the roof is energy efficient.

The windows are energy efficient, but the roof is not energy efficient.

4 0
1 year ago
ANSWER QUICKLY!!! <br><br> What is an advantage of digital portfolios?
algol13
Easy to carry or utilize
8 0
2 years ago
When using overloaded functions in appication code, the compiler will call which one
musickatia [10]

Answer:

The function with same name,same number and type of arguments.

Explanation:

Function overloading occurs when the functions with same name in the same scope with the same return type but different argument numbers and different argument types.So when we want to call a specific function we have to pass the same number of arguments with same type of arguments.We can do function overloading for the functions with same return type only.

7 0
4 years ago
Write a program that prompt the user to enter a bank balance. The balance entered by the user is read into a variable named bala
IRINA_888 [86]

Answer:

ertyuiopoijuhgfdsa hiyoufun tresdfghytrefgytredfg

Explanation:

look for the words

4 0
3 years ago
Other questions:
  • When a user first authenticates with a Kerberos-based server, he/she will receive _________ Group of answer choices a ticket-gra
    10·1 answer
  • How do you enlarge your screen if there is no control panel? Need desperate help!
    15·1 answer
  • Two positive outcomes generally associated with modern computing are greater _____.
    12·2 answers
  • Assign a variable solveEquation with a function expression that has three parameters (x, y, and z) and returns the result of eva
    6·1 answer
  • In the world of computing, _________ means acquiring or exchanging copies of protected digital creations without payment or perm
    12·1 answer
  • Define an iterative function named append_ordered; it is passed two arguments: a linked list (ll) whose values are ordered from
    15·1 answer
  • If you'd like to queue multiple exports and keep working on a different project in Premiere Pro, what method should you use?
    5·1 answer
  • Which unknown factor affects prices in the financial markets?
    9·1 answer
  • How to write my name in binary code ? Rivas
    7·2 answers
  • Which tab contains the Spell Check feature?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!