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
Noticing his reduced performance at work, Dan enrolled himself for training sessions offered by the company and saw his producti
Luden [163]

A. self-efficacy.

B. overreward inequity.

C. expectancy.

D. cognitive distortion.

Answer:B. overreward inequity.

Explanation: Overreward inequity is a term mostly associated with the feeling of guilt by an employee who believes that his contributions to work or his performance rating is less than what he or she is been paid for.

An employee with this kind of guilt feelings will mostly like do his or her best to engage in in performance improvement Activities which includes enrollment for training and classes to enhance his or her performance.

6 0
2 years ago
Which of the following should be clicked to open Backstage View?
lora16 [44]

Answer:

File tab

Explanation:

source https://www.computerhope.com/jargon/b/backstage-view.htm

7 0
2 years ago
Read 2 more answers
__________ is the electronic transmission of signals for communications, which enables organizations to carry out their processe
Serjik [45]

Telecommunications is the electronic transmission of signals for communications, which enables organizations to carry out their processes and tasks through effective computer networks

4 0
3 years ago
Given that k refers to a non-negative int value and that t has been defined and refers to a tuple with at least k+1 elements, wr
Rus_ich [418]

Answer:

The expression is "t[k]".

Explanation:

In the question, it is defined that variable k refers to positive integer and variable t refers to a tuple that holds at least k+1 element. The expression for defining the kth element of t is t[k].

  • Where variable t is tuple that collects a sequence of immutable (in-built) Python objects. To define tuple we use the parentheses.
  • The main purpose to use tuple in this question is that it cannot be changed.  

5 0
3 years ago
You want some points? whoever answers first gets 48 points. no cap. better be quick.
LekaFEV [45]

Answer:

4

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • You want to register the domain name ABCcompany.org, but the registration service is not allowing you to do that. What's the mos
    10·1 answer
  • Explain the distinction between interpretation and compilation. What are the comparative advantages and disadvantages of the two
    11·1 answer
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • Which port must be open on your router to allow you to upload device configuration and firmware updates using trivial file trans
    13·1 answer
  • Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the bool variabl
    6·1 answer
  • Select the correct answer.
    13·2 answers
  • What is the name of the process of checking the client's production environment to ensure software and hardware compatibility wi
    5·2 answers
  • As part of your regular system maintenance, you install the latest operating system updates on your Windows 10 computer. After s
    12·1 answer
  • For a certain company, the cost function for producing x items is C(x)=50x+100 and the revenue function for selling x items is R
    12·1 answer
  • What represents a user’s specific preferences?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!