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
Nuetrik [128]
3 years ago
8

g Write a Racket function (process lst1 lst2) that processes the corresponding elements of the two lists and returns a list. If

the corresponding elements are both numbers, include the sum of the two corresponding elements in the list that is returned.
Computers and Technology
1 answer:
blagie [28]3 years ago
8 0

Answer:

  1. def process(lst1, lst2):
  2.    newList = []
  3.    for i in range(0, len(lst1)):
  4.        sum = lst1[i] + lst2[i]
  5.        newList.append(sum)
  6.    return newList
  7. list1 = [1, 3, 5, 7, 9]
  8. list2 = [2, 4, 6, 8, 10]
  9. print(process(list1, list2))

Explanation:

Firstly, create a function process that takes two input lists (Line 1). In the function, create a new list (Line 2). Use a for loop to traverse through the elements of the two lists and total up the corresponding elements and add the sum to the new list (Line 3 - 5). At last, return the new list (Line 6).

In the main program, create two sample list and use them as arguments to test the function process (Line 8 - 9). We shall get the output  [3, 7, 11, 15, 19].

You might be interested in
Apps and applications are both software but have a number of significant differences
kipiarov [429]
Apps do a single function where applications do multiple functions
7 0
3 years ago
You are writing a device driver for an audio device connected to your computer. Your code needs to determine if the device is bu
Zepler [3.9K]

Answer: hello the options related to your question is missing attached below is the complete question and options

answer : Read the status register ( A )

Explanation:

To determine if the device is busy or ready to accept a new command the line of action is to write a code that will Read the status register. A status register   is a hardware register which contains the information about the processor of the device ( i.e. whether the processor is busy or ready )

5 0
3 years ago
HELPPP!!!!!!
liraira [26]
The answer is 1.7 billion
4 0
3 years ago
How many types of video<br>compressions__<br>a. 4<br>b. 2.<br>• c. 3<br>d. 6​
monitta
A. I think correct me if I’m wrong
3 0
3 years ago
ICMP
sp2606 [1]

Answer:

(b) is used in Traceroute

(d) is used by Ping

Explanation:

ICMP is the short form of Internet Control Message Protocol. It is a protocol used by networking devices such as routers to perform network diagnostics and management. Since it is a messaging protocol, it is used for sending network error messages and operations information. A typical message could be;

i. Requested service is not available

ii. Host could not be reached

ICMP does not use ports. Rather it uses types and codes. Some of the most common types are <em>echo request</em> and <em>echo reply.</em>

<em />

Traceroute - which is a diagnostic tool - uses some messages available in ICMP (such as <em>Time Exceeded</em>) to trace a network route.

Ping - which is an administrative tool for identifying whether a host is reachable or not - also uses ICMP. The ping sends ICMP <em>echo request </em>packets to the host and then waits for an ICMP <em>echo reply</em> from the host.

ICMP is not required to solve NAT traversal problem neither does it have a new version in IPV6.

6 0
3 years ago
Other questions:
  • Use the image below to answer this question.
    14·1 answer
  • The text discusses three approaches to combining overall cost leadership and differentiation competitive advantages. Which of th
    10·1 answer
  • Five computers are connected to a switch in a star topology. what type of network is this?
    12·1 answer
  • Can a percent be used in a filename?
    13·1 answer
  • In which of the security mechanism does the file containing data of the users/user groups have inbuilt security?
    6·1 answer
  • Importance of software in computer
    10·2 answers
  • Which of the following is NOT a factor of identifying graphic design?
    10·2 answers
  • User defined blocks of code can be created in
    13·1 answer
  • in Python we use IDE ( lntegrated Dvelopment Environment ) to write down the program data points of difference between script mo
    13·1 answer
  • PLEASE HELP! WILL MARK AS BRAINLIEST!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!