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
You want to use a terminal emulation program to terminal into a series of Cisco routers. You will be managing these devices remo
vampirchik [111]
If a terminal emulation program is used and the devices should be reotely managed, then you should use the Telnet protocol. <span>Telnet is a simple, text-based network protocol that is used for accessing remote computers over TCP/IP networks like the Internet. </span>It allows the user access<span> to a text terminal and all its </span>applications<span> such as command-line for example. </span>

7 0
3 years ago
A program reads three integer values. The three values are interpreted as representing the lengths of the sides of a triangle. T
Andru [333]

Answer:

5

Explanation:

5 0
4 years ago
entry that has the address of 192.168.101.0 and the wildcard mask of 0.0.0.255. What is the range of IPv4 addresses that will be
svp [43]

Answer:

192.168.101.0 through 192.168.101.255 is the correct answer.

Explanation:

The following answer is correct because the address of the ACL entry is 192.168.101.0 and 0.0.0.255 is the wildcard mask then, the range of the IPv4 addresses is 192.168.101.0 through 192.168.101.255 that affected by the ACL.

ACL is referred as the access control list that acts as the firewall which secures the VPC network of the user.

6 0
3 years ago
In cell B20, enter a
zzz [600]

Answer:

かあなたは棚田やヌタほたややあはあやあやあさあ与田弥太は沙汰やあはあわあね、田やホワアラハやくださいヤアカやさ矢田かほあや体は白湯のやさた

Explanation:

なたさたらなやさゆなやさら

5 0
2 years ago
A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plan
Annette [7]

Answer:

A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plans to increase wireless density by 50% in the near future. The requirements state that the chosen solution should significantly decrease the management overhead of the current wireless network. The following should be recommended by the vendor in response to the quote request:

B. The use of autonomous APs with a wireless controller.

Explanation:

  • The option A  and D are not correct as the use of lightweight APs are not required here because they are already using autonomous APs which are fulfilling their needs.
  • The option B is correct as the use of autonomous APs with a wireless controller will allow them to decrease the management overhead as the wireless controller is used to manage the Access points in larger quantities.
  • The option C is incorrect as the load balancers are used to increase the capacity and reliability of applications as they distribute the traffic over number of servers so it is unable to decrease the management overhead.  
6 0
4 years ago
Other questions:
  • Attacker player X is standing still on a corner kick, as the ball is played, he jumps up with his arms flailing above his should
    8·1 answer
  • Which statement describing an operating system's Search feature is true?
    5·1 answer
  • What component is most likely to be installed in a PC, is considered primary storage, and typically stores the operating system,
    6·1 answer
  • Eric has asked you to help him build a new gaming computer so that he can play the newest games available. He also wants the com
    6·1 answer
  • What was the first message ever sent in morse code?
    13·1 answer
  • Before creating a brief to design a product, what is needed
    8·1 answer
  • Write a program that uses a custom function to return the cost of purchasing an item, possibly in multiple quantities. The item
    14·1 answer
  • What is subscriber billing in Google Play and where does the money go?
    5·1 answer
  • Why do electronic devices gather so much dust? Thanks
    8·1 answer
  • Write a program that requests the user input a word, then prints every other letter of the word starting with the first letter.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!