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 list 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}]

Answers

Answer 1

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 .


Related Questions

Can someone please help me? my audio visual teacher wants me to watch two movies. i've never seen them and i have no way to watch them. Has anybody seen them?

Answers

Answer:

You can try afdah or 123 movies, maybe try Netflix if you have it

Explanation:

The sites do have ads but that's where I usually watch my movies

You resurrected an old worksheet. It appears to contain most of the information that you need, but not all of it. Which step should you take next?
a) Check for data you have previously hidden.
b) Make the columns wider.
c) Check that the worksheet is not Read-Only.
d) Change the format to reduce the font size.

Answers

Answer:

a)

Explanation:

Since the worksheet contains most of the data that you need, there is a decent possibility that it also contains the data that you are missing. Therefore, you should check for data you have previously hidden. Sometimes, some data in a worksheet may become irrelevant in a given moment, and instead of deleting it since it may be useful later most people tend to make that data hidden. So checking for previously hidden data may be the best solution in this scenario.

what device copies system files

Answers

Answer:

directs the entire computer system to carry out every activity, and regulates the

Explanation:

When an online auction site increases its number of users, then the value of the site increases for everyone. This is an example of the _____.
gig economy
democratization of technology
network effect
Internet of Things

Answers

Answer:

Network Effect

what pattern is a heart-shaped pattern that captures sound from a single direction, ?from the front?

Answers

Answer:

The pickup diagram for the Cardioid (heart-shaped) microphone pattern tells you is that the microphone is most sensitive to sound coming in from the front (where the blue arrow is), and will tend to “refuse” sound coming in from the other side (the red arrow points to that part).

Explanation:

The variable, A, starts with the value, 1 The variable, B, starts with the value, 10 The variable, C, starts with the value, 100. The variable, X, starts with the value, 0 Store the value of C times 3 in X. Add the value of B times 6 to the value already in X Add the value of A times 5 to the value already in X. Display the value in X on the screen. Output #3 Pseudocode #3

Answers

Answer:

1. Start

2. A = 1

3. B = 10

4. C = 100

5. X = 0

6. X = C * 3

7. X = X + B * 6

8. X = X + A * 5

9. Print X

10. Stop

Explanation:

Required

Write the Pseudocode for the instruction

The pseudocode begins and ends with a start and stop statement

The next 4 lines initializes A, B, C and X

2. A = 1

3. B = 10

4. C = 100

5. X = 0

The next 3 lines calculates the new value of X base on the given instruction

6. X = C * 3

7. X = X + B * 6

8. X = X + A * 5

This line displays the value of X to the screen

9. Print X

Which of these is the most likely result if the internet download speed in your home is 25 Mbps?
Your microphone won't record well.
O A game you previously downloaded will generate errors.
The printer may not function well.
Streaming movies may stop to buffer.

Answers

Answer:

Streaming movies may stop to buffer

Explanation:

microphones have a set record limit, and games downloaded wont generate errors unless something in the code is wrong, printers don't really need to connect to internet to work except for some, and streaming movies buffer because as you are watching them it downloads the next few minutes.

Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer) try: if width > 30: raise TooWide else: print("Have a nice trip!") -------TooWide: print("Your luggage will not fit in the overhead bin.")

Answers

Answer:

Replace ______ with except

Explanation:

Your program is an illustration to try except in Python

When the Python interpreter sees a try statement, it expects a corresponding an except statement

So, the complete program is:

class TooWide(Exception): pass

answer = input('How wide is it? ')

width = float(answer)

try:

     if width > 30:

           raise TooWide

     else:

           print("Have a nice trip!")

except TooWide:

     print("Your luggage will not fit in the overhead bin.")

Answer:

except

Explanation:

took test

Which command is used to encrypt all passwords in a router configuration file?

Answers

Answer:

Service Password encryption

Explanation:

It is noted that the command used on routers, to get the data of all the passwords in a router configuration file encrypted is the service password encryption.

Service password encryption solely affects plain text passwords types that includes that of the line passwords or that of the enable password. The feature uses a simple substitution method to create a "secure" non-text password displayed in the configuration.

Answer is B because portrait is define that they take only photographs of people and like to communicate with people they are well known or comfortable.

Answers

ty ive been looking for that answer

Which kind of testing runs the system in a simulated environment using simulated data?a) validation testing. b) verification testing. c) audit testing. d) matrix testing.

Answers

Answer: verification testing

Explanation:

Verification testing is the testing that runs the system in a simulated environment using simulated data. Verification testing involves different activities like design review, system requirements, business requirements, and code walkthrough which are used while a a product is being developed. It is done in order to ensure they the right product is being developed.

What is the value of j after this code is executed? int i = 6, int j=10; j+=i;

Answers

Answer:

16

Explanation:

+= is an assignment operator that adds a value to the existing value.

DO ALL THE FACES YOU CAN DO ON YOUR COMPUTER! (Please tell me how to do them)

Answers

Answer. (: ): (; ); [: ]: [;  ];

Explanation:

Near the numbers and letters on your keyboard you should have ability to re-create the faces that you know or can find

can java scanner not take in a negative input?

Answers

Answer:

It can take a negative input

Explanation:

When you declare a variable in Java and you get your input via Scanner library; the Scanner library will accept the input irrespective of whether it's negative or not.

Take for instance, the following segment

Scanner input = new Scanner(System.in);

int userinput = input.nextInt()

Irrespective of whether userinput is negative or positive, it'll accept it.

Which type of RAM is used exclusively in laptops?
a) SODIMM
b) DDR3
c) DDR
d) DDR4

Answers

Answer:

DDR3

Explanation:

Which of the following is not a property of a constructor?A. The name of a constructor can be chosen by the programmerB. A constructor is called using the new operatorC. A constructor must have the same name as the classD. Constructors may be overloaded

Answers

Answer:

The answer is "Option A"

Explanation:

The constructor is a special member function whose task is to initialize an object from its class, and it doesn't return any value like int, float, double, etc. Its name and class name will always be the same, and when we create the class object so, the constructor is automatically called, and it may be overloaded, that's why we can say that except the "choice A", all were correct.

Page No.:
NEW LINK
Date : / /
Write
any
three differences between Hard
Disk and floppy disk.​

Answers

Answer:

The difference is that a floppy relies on a floppy disk reader to spin its disk, where as a hard drive is a fully enclosed container that has it's reader enclosed as well. A floppy disk is a single plastic film disk, where as a hard disk can have multiple metal disks.

Explanation:

What is an artificial intelligence system that mimics the evolutionary, survival-of-the-fittest process to generate increasingly better solutions to a problem?A. Intelligence system.B. Artificial intelligence.C. Neural network.D. Genetic algorithm.

Answers

Answer: genetic algorithm


Explanation: A genetic algorithm is an intelligent system that mimics the evolutionary, survival-of-the fittest process to generate increasingly better solutions to a problem. Genetic algorithms are used to design aircraftparts such as fan blades etc.

Artificial intelligence system exploits the use of computers and technological devices to simulate the human mind's to solve potential problem concerns and make strategic decisions.

Artificial intelligence is essential due to the fact that it provides businesses with virtually unlimited insights into their operations and in some circumstances, Artificial intelligence can carry out tasks better than people, especially when it comes to recurring, technical-detailed activities like reviewing huge quantities of datasets to ensure essential fields are accurately filled in.

However,  Neural networks are based on Deep learning techniques, which are a subfield of machine learning. They're designed by the use of the concept of the human brain, and they work by simulating how real neurons communicate with one another.

In the disciplines of Artificial intelligence and machine learning, neural networks mimic the activity of the human brain, enabling computer programs to identify patterns, formulate strategies and tackle basic problems.

Finally, from the scope of Artificial intelligence, Genetic algorithm emulates the principle of Darwinian selection which chooses only the fittest for reproduction. By replicating the evolutionary path of survival-of-the-fittest to accomplish a stated goal, genetic algorithms could solve difficult issues with numerous variables and a huge number of alternative solutions.

Therefore, from the above explanations, we can conclude that an artificial intelligence system that mimics the evolutionary, survival-of-the-fittest process to generate increasingly better solutions to a problem is known as a Genetic algorithm.

Learn more about artificial intelligence here:

https://brainly.com/question/23824028?referrer=searchResults

Write a program to print the sum of two given numbers.

Answers

Answer:

this program is for c++

Explanation:

#include<iostream>

main()

{

int num1,num2,added number;

cout<<"enter your first number";

cin>>num1;

cout<<"enter your second number":

cin>>num2:

num3=num1+num2;

cout<<"the added value of these two are",num3;

}

Describe a game that you have played (video game or other type of game) that had a good balance between being easy to learn the rules but hard to master overall. Identify specific parts of the gameplay and/or game mechanics that contributed to this balance.

Answers

Answer: Well my sister has a Super Mario Odyssey game for Nintend. The controls are easy to learn but the game is quite difficult. The goal is to find moons to catch up to Browser, who has stolen Mario’s friend, Peach. On the way you run into to challenges that are hard and easy. Overall the game is ballenced well. With amazing details and graphics.

Explanation:

Which of the following devices are used in networking?A. Routers.
B. Hubs.
C. TCP.
D. Switches.

Answers

Answer:

A, Routers

Explanation:

Routers are used

The devices used in networking are:

A. Routers

D. Switches

Thus, option (A) and (D) are correct.

A. Routers: Routers are network devices that facilitate the transfer of data packets between different networks. They determine the best path for data to reach its destination and enable communication between devices on separate networks.

B. Hubs: Hubs were commonly used in early networking but are now outdated. They are passive devices that broadcast data to all connected devices, leading to inefficient data transmission.

C. TCP: TCP (Transmission Control Protocol) is not a networking device but rather a communication protocol used in the transport layer of the TCP/IP protocol suite. It ensures reliable data delivery by establishing a connection between devices and managing data flow control.

D. Switches: Switches are network devices that connect multiple devices within a local area network (LAN). They forward data packets only to the intended recipient, allowing for efficient data transmission within the same network.

Thus, Routers and Switches are parts.

Thus, option (A) and (D) are correct.

Learn more about Networking here:

https://brainly.com/question/29350844

#SPJ6

what is a good rule-of-thumb for using color background in a worksheet?

Answers

Answer: The answer is given below

Explanation:

A good rule-of-thumb for using color background in a worksheet are:

• Avoid using more than four colors as ideally 2-3 colors should be used.

• Opt for tones, shades, and tints rather than being tempted to use many colors.

• Colors that are controversial should be avoided.

• Color should be added when it's required to pass across a message.

• A base color should first be selected, then complementary colors should be added to it.

You can access cloud files from any computer smart phone or tablet as long as it is connected to the Internet is it true or false

Answers

Answer:yes

Explanation:

because it is the internet

Brian has a meeting to attend at 10:30 am. However, he got stuck in traffic. Everybody at his office was ready for the meeting and had to wait
for him to arrive. What should Brian do in this situation?
OA. He should start walking toward his workplace.
OB. He should wait for someone to call him and ask why he is late,
Ос.
He should inform his manager that he will be late.
OD. He should keep quiet about being late.

Answers

Answer:

C. infirm his manager that he will be late

Explanation:

thats the right thing to do in that situation so u don't leave them waiting

Which of the following conditions would most likely result in corrupted data? A. an open in a cable B. a VLAN mismatch C. a short in a cable D. none of above

Answers

Answer:

D. none of above

Explanation:

Option A is not appropriate because an open in a cable does not the data to be transferred at all. An open in the cable is when the intended connection is missing or there is a break in the wire which stops the current flow.

Option B is also incorrect because a VLAN mismatch is causes when two connected switch ports have different VLAN configurations and this does not let the data propagate successfully. So connectivity issues occur between the devices and data cannot be exchanged between them.

Option C is also incorrect because a short in a cable, like an open in a cable, does not let the data to be transferred. A short in a cable is when an unintended connection is there such as when two wires touch each other. So this leads to the current flow through the short.

The possible condition that can cause corrupted data are:

bad cables: using a wrong category of cables in order to interconnect devices for exchanging data.

exceeded cable distance limit: When the cable distances are exceeded this might result in signal loss.

faulty connectors: these are broken connectors which do not properly make a connection.

someone can help plz " Provide definitions for the following terms: bit, byte, kilobyte (KB), megabyte (MB), gigabyte (GB), Terabyte (TB)."

Answers

Answer:

Explanation:

Bit: A bit (short for binary digit) is the smallest unit of data in a computer. A bit has a single binary value, either 0 or 1.

Byte: A byte is a data measurement unit that contains eight bits, or a series of eight zeros and ones.

Kilobyte: A KB (kilobyte) is 1000 bytes.

Megatype: An MB (megabyte) is 1000 kilobytes.

Gigatype: A GB (gigabyte) is 1000 megabytes.

Terabyte: A TB (terabyte) is 1000 gigabytes.

hope this helped you!

Is Bob Lazar telling a lie/withholding information?

Answers

Answer:

I think he may be a nut, but I'm not sure, there's little evidence of what he says to be true.

If you view classified information through the internet on your work computer, either intentionally or inadvertently, what should you do first?

Answers

Answer:

disconnect your computer from the network

If you view classified information through the internet on your work computer, either intentionally or inadvertently, disconnect the computer from the network.

What is meant by computer networking?

Computer networking is the term for a network of connected computers that may communicate and share resources. These networked devices transmit data through wireless or physical technologies using a set of guidelines known as communications protocols.

A group of computers sharing resources that are available on or offered by network nodes is known as a computer network. Over digital links, the computers communicate with one another using standard communication protocols.

Disconnect the PC from the network if you accidentally or purposely read classified information online while utilizing a business computer.

To learn more about computer networks refer to:

https://brainly.com/question/1167985

#SPJ2

Compare and Contrast the 1977 Freaky Friday and the 2003 Freaky Friday

Answers

Answer:

What do you mean by ?

Explanation:

I can't understand. Please tell clearly.

Which of the following statements are true regarding Steve Jobs and Steve Wozniak? Select 3 options

Answers

Answer:

Steve Job founded Apple and managed the company from its inception until his death.

Steve Wozniak worked for Hewlett Packard designing calculators before starting Apple.

Steve Jobs never learned to code and primarily focused on design.

Explanation:

Answer:

the person above me is correct

Explanation:

got it right on edge

Other Questions
50 POINTS! Is Brainly lagging for anyone? It's kicking me off the site. A lot. It says something like 502 bad gateway. Also, I'm just putting this under math, and hopefully, people see it. The Blakely family has driven 50 miles of a 200-mile trip. Their car travels 30 miles per gallon of gas. How many gallons of gasoline, g, will the car use on the remainder of the trip? 2 and one-half gallons gallons gallons 8 and one-third gallons What do you understand by the term 'life process"? Which agreement led to the reduced release of chemicals that harm the ozone layer? HELP ME PLEASE, what kind of cell is? A student half a jar with rice and tightens the jars lid. The student wants to use the jar of rice to model particle motion of a substance in any state of matter. A. Describe how the student can use the jar of rice to model particle motion of a substance in each state of matter: solid, liquid, gas. Find the mean absolute deviation of the set of data. 2, 3, 5, 7, 9 What is the product of 3yproduct of (3y^)(274) . Explain how surface waves can have characteristics of both longitudinal waves and transverse waves. Please use 3 content related sentences. (ref: p.388-393) The cooking time for a mini-loaf of bread is 5 minutes longer than half the time it takes to bake a regular-sized loaf of bread. If it takes 25 minutes to bake a mini-loaf, how long does it take to bake a regular-sized loaf?10 minutes20 minutes30 minutes40 minutes 10x 2-60| 0 ||0Is it correct? Order of operations A set of three scores consists of the values 6, 3, and 2. 1. 2X 2 =______.a. 35.b. 33.c. 22.d. 6.2. (2X) =______.a. 248.b. 124.c. 61.d. 39. fill in the blank i need a ___ bleep _____ ___ lil shawty the baddest Two numbers are in the ratio 9:7 if one number is 324, what is the other number? The point (2,-4) is on the line given by which equation below?2,-4)A. y = -x + 3B. y = x - 4C. y=-2xD. y = 2x Conduction occurs when thermal energy is transferred by the movement of a. Waves b. molecules c. liquids d. fluids A taxi charges $3, plus $1.50 for each mile traveled. Mr.Lewis rode in the taxi from his home to the airport and was charged $30. How many miles does Mr.Lewis live from the airport A bus first travels west for38 kilometers. Then it turns south andtravels for 25 kilometers. Next it goeseast for 38 kilometers. Finally, it travelsnorth for an unknown number ofkilometers. At the end of the journey,the bus is back at the original location.How far did it travel northward? Pearse Kennel uses tenant-days as its measure of activity; an animal housed in the kennel for one day is counted as one tenant-day. During December, the kennel budgeted for 3,000 tenant-days, but its actual level of activity was 2,980 tenant-days. The kennel has provided the following data concerning the formulas used in its budgeting and its actual results for December: Data used in budgeting: Fixed Variable per month per tenant-day Revenue $32.10 Wages & Salaries $2,400 $ 7.00 Food & Supplies $ 900 $11.30 Facitlity Expenses $8,600 $ 3.50 Admin Expenses $6,700 $ 0.30 Total Expenses $18,600 $22.10 Actual results for December: Revenue $97,978 Wages & Salaries $23,530 Food & Supplies $35,224 Facility Expenses $19,780 Admin. Expenses $ 7,404 1. The activity variance (show any unfavorable variance as a negative number) for net operating income in December would be: 2. The net operating income in the planning budget for December would be: 3. The net operating income in the flexible budget for December would be: Which statement best describes a tornado? Tornadoes bring freezing rain and sleet. Tornadoes bring storm surges and flooding. Tornadoes bring winds that travel about 74 mph. Tornadoes bring a column of air that stretches to the ground.