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
How to get an hdmi working from a chromebook?
igomit [66]
Use an adapter, costs money though.
8 0
3 years ago
Read 2 more answers
Is megan the stallion hot
astraxan [27]

Answer:

Explanation:

Cool

8 0
2 years ago
Read 2 more answers
Which IDEs support multiple high-level programming languages? Select all that apply.
rewona [7]

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

This question is about integrated development environments (IDEs) that support multiple high-level programming languages.

All mentioned IDEs such as Eclipse, Visual Studio, and Xcode support multiple high-level programming languages except Linux.

Using Eclipse, you can do Java programming easily and can build Java-based programs, and also you can do android programming in Eclipse while importing required android settings and libraries. Visual Studio is a Microsoft IDE, in which you can build desktop, web, and mobile, and windows phone app easily using high-level programming. Xcode is an integrated development environment for macOS containing a suite of software development tools developed by Apple for developing software for macOS, iPadOS, iOS, watchOS, and tvOS.

While Linux is not an IDEs, it is an open-source operating system based on Linux kernel.

8 0
3 years ago
What option in the alignment settings for a cell should be used to put text in a diagonal fashion?
tigry1 [53]

Answer:

The orientation option

Explanation:

Orientation in excel allows you to rotate text in several different ways. We can used this option to spice things up a bit. There are several kinds of orientation. There is one where the orientation can be rotated and the other one where the text can be either be put in a vertical or diagonal fashion.

5 0
3 years ago
Read 2 more answers
I really need the answer now!!
guajiro [1.7K]

Answer:

3. B.

4. B.

5. B.

6. C.

7. D.

8. C.

9. C.

10. D.

Explanation:

I hope I helped you.

4 0
2 years ago
Other questions:
  • In three to five sentences, describe how you can organize written information logically and sequentially
    8·1 answer
  • How does scarcity affect what gets produced
    5·1 answer
  • TRUE OR FALSE: Individuals involved in surveillance prior to a terrorist attack are always well-trained and equipped.
    13·1 answer
  • A porta power tool is what kind of tool
    9·1 answer
  • You should structure the<br> first before you search for a relevant picture.
    11·1 answer
  • Who ever likes Pokemon an wants to help me please comment and I will Give the room for My Assignment
    9·1 answer
  • PLZ help
    5·1 answer
  • Determine which Software Type on the right best corresponds to each Definition on the left. Then, click the Definition, and then
    8·1 answer
  • Write a program that asks the user for the name of a file. The program should display the contents of the file with each line pr
    13·1 answer
  • Which option should Gina click to edit the text contained in a text box on a slide in her presentation?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!