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
Ostrovityanka [42]
3 years ago
15

Given the list of customer segments below please create a new list of the names of the segments only using(a) a for loop(b) a li

st comprehension(c) a map().List would look something like ['Wallstreet','Gambler','Parents'] but of course using each tool as listed:segments = [{'name': 'Wallstreet', 'average_spend': 82.01}, {'name': 'Gambler', 'average_spend': 107.00}, {'name': 'Parents', 'average_spend': 10.52}]
Computers and Technology
1 answer:
Alchen [17]3 years ago
7 0

Answer:

new_segment = [ ]

for segment in segments:

   new_segment.append({'name': segment, 'average_spend': money})

print( new_segment)

Using list comprehension:

new_segment =[{'name': segment, 'average_spend': money}  for segment in segments]

Using map():

def listing(a):

   contain =  {'name': segment, 'average_spend': money}

   return contain

new_segment = [ ]

new_segment.append(map( listing, segment))

print(list(new_segment)

Explanation:

The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .

You might be interested in
What are the two types of computer keyboards and how are they different?
VARVARA [1.3K]
A piano keyboard
A qwerty keyboard
A Dvorak Simplified Keyboard

These are 3 types of keyboard
4 0
3 years ago
Read 2 more answers
Please help me on this I don't know which one they are​
Nutka1998 [239]
Hi, the photo doesn’t show the question on what to answer, all I see are empt boxes, if you message me the question I will answer it for you!
7 0
3 years ago
Read 2 more answers
Management of software development consist of?
JulsSmile [24]

Answer:

d. All of the above

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

In Computer science, management of software development consist of;

a. Process: it involves the stages through which a software application is analyzed, designed, developed, tested, etc.

b. People: it refers to the individuals involved in the software development process.

c. Project: it's the entirety of the stages a software goes through before it gets to the end user.

5 0
3 years ago
A database, a database management system, and the application programs that use the data, make up a database environment.
BlackZzzverrR [31]

Answer:

A) The statement is true

8 0
3 years ago
If given the chance to own manage a business,what will be the name of the business?
Nady [450]
This is honestly an answer you can give. What would you name a business if you made one?
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following illustrates the proper declaration of a variable and data type to hold a whole number?
    13·1 answer
  • Which of these planets has the coldest surface temperature?
    6·2 answers
  • Describe any four rights of users of information systems.
    8·1 answer
  • So I’m doing a PowerPoint of how social media changed my life any ideas what I should right down and what kind of topics should
    11·2 answers
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • PLEASE SOMEONE ANSWER THIS
    14·2 answers
  • Juhfvehrfwhedfhwkefhkujhiuyuiyuiyiyh
    6·1 answer
  • What is the difference between the byte and short data types in Java?
    7·1 answer
  • 1. Which of the following is not true about high-level programming language s? (a) Easy to read and write (b) Popular among prog
    12·1 answer
  • If a password is entered wrongly three times the computer will
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!