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
attackers typically use ack scans to get past a firewall or other filtering device. how does the process of an ack scan work to
bogdanovich [222]

Attackers frequently use ACK scans to circumvent a firewall or other filtering tools. During a NULL scan, all packet flags are enabled. The most recent versions of Nessus Server and Client are compatible with Windows, Mac OS X, FreeBSD, and the vast majority of Linux variants.

<h3>What is ack scan ?</h3>
  • ACK scans are used to identify hosts or ports that have been blocked or are resistant to other types of scanning. An attacker uses TCP ACK segments to learn about firewall or ACL configuration.
  • Attackers probe our router or send unsolicited SYN, ACK, and FIN requests to specific UDP/TCP ports.
  • TCP ACK Scan sends an ACK message to the target port to determine whether or not it is filtered.
  • On unfiltered ports, a RST reply packet will be sent for both open and closed ports. Filtered ports will either generate no response or generate an ICMP reply packet with an unreachable destination.
  • The TCP ACK scanning technique attempts to determine whether a port is filtered by using packets with the ACK flag set.

To learn more about ask scan refer to:

brainly.com/question/13055134

#SPJ4

3 0
1 year ago
Which of the following is the most appropriate unit to describe the rate at which data is transferred using the internet?
Andrei [34K]
The best option and the one who explains itself better is the first option <span>Megabits per second; because the independent quantity is time in seconds and dependent quantity is amount of data in megabits. In this case the dependent variable is the amount of data in megabits, something you can control, but time in seconds is indeed the independent variable.</span>
7 0
4 years ago
Read 2 more answers
Questlon 5 of 25
Solnce55 [7]

Answer:

sorry maam/sir i wish i could help but i dont know how to answer that

Explanation:

because im middle school

3 0
3 years ago
The ........ tag is used to create a link to another document​
Free_Kalibri [48]

Answer:

The "a" tag or <a></a> and its "h<u>r</u>ef" attribute <a href="#"></a>

Explanation:

In html there is only one way to create a link to an external source or a bookmark. The tag is created using the element <a>.

The attribute "href" is then added to describe the link of where it is to point to.

Example:

<a href="google.com">Go to Google</a>

While the text in between the tag describes what the link is about.

7 0
3 years ago
How to add running head and page number in word?
yaroslaw [1]
If you go into word and click the insert table you will see a section that says header, footer and page number. That is where you add a head and page number. 
4 0
4 years ago
Other questions:
  • Design a 4-to-16 line Decoder by using the two 3*8 decoder-line decoders. The 3-to-8 line decoders have an enable input ( '1' =e
    13·1 answer
  • This measures how close a biometric reading is to a prerecorded template
    11·1 answer
  • On the server side, the database environment must be properly configured to respond to clients' requests in the fastest way poss
    12·1 answer
  • Fear and superstition were swept away as scientists began to understand natural phenomena, leading to a shift in content for gra
    5·1 answer
  • (((PLEASE HELP QUICK))) When writing research questions you should begin with ____.
    13·2 answers
  • You are creating a mobile version of a community discussion site for busy moms. Users post questions and other topics for discus
    10·1 answer
  • Select the correct term to complete the sentence.
    7·1 answer
  • Who is this wrong answers only
    7·1 answer
  • Gourmet pizza shop with a
    6·1 answer
  • What is the difference between
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!