Considering there are 2 dictionaries, one with the name of the person and the stock name and number of stocks they have and the other dictionary has the stock name and it’s today’s market value -

Ex: a = { “Joe” :{“AAPL”:5, “AMZN”:2}, ”Bill” :{“AAPL”:2, “AMZN” :5 }}

B = {“AAPL” : 227, “AMZN” :1721 , “NFLX” : 267 , “TSLA” : 244, “FB” : 179 }



Write a Python program to find the amount of money each person makes by selling all of their stock today, and who will get the most value

Answers

Answer 1

a = {"Joe": {"AAPL": 5, "AMZN": 2}, "Bill": {"AAPL": 2, "AMZN": 5}}

B = {"AAPL": 227, "AMZN": 1721, "NFLX": 267, "TSLA": 244, "FB": 179}

total = 0

largest = 0

for x in a:

   for w in a[x]:

       total += a[x][w] * B[w]

   a[x] = total

   if total > largest:

       largest = total

   print("{} will have ${}".format(x, total))

for x in a:

   if a[x] == largest:

       print("{} will get the most value".format(x))

I hope this helps!


Related Questions

import java.util.Scanner;

public class PigLatin {
public static void main(String args[]) {
Scanner console =new Scanner(System.in);
System.out.println("Please enter a word");
String phrase=console.nextLine();

System.out.println(eachWord(phrase));
}

public static String eachWord(String phrase) {
String help[]=phrase.split(" ");

for(int i=0; i
if (help[i].charAt(0) == 'a'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'e'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'i'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'o'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'u'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'A'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'E'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'I'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'O'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'U'){
return help[i] + "-ay";
}
else {
return help[i].substring(1)+"-"+help[i].charAt(0)+"ay";
}

}
return "aoujbfgaiubsgasdfasd";
}

I need help with this Pig Latin Program. I want to split the string so each word can run through the method eachWord. I don't know how to revamp this!

Answers

Answer:b

Explanation:

I took quiz

Answer:

uuuuuuuuuuhhm

Explanation:

CODE!

Write a python program to input money in Bahrain dinar and find out number of denominations can be used to make that money.

For example: -
Enter total money in BD: 76
Then the output Should be :
No.of 20 BD : 3
No.of 10 BD : 1
No.of 5 BD : 1
No.of 1 BD : 1

Pls answer fast

Answers

n = int(input("Enter total money in BD: "))

n20 = n//20

n10 = (n-(n20*20))//10

n5 = (n - ((n20*20)+(n10*10)))//5

n1 = (n - ((n20*20)+(n10*10) + (n5*5)))//1

print("No. of 20 BD: "+str(n20))

print("No. of 10 BD: "+str(n10))

print("No. of 5 BD: "+str(n5))

print("No. of 1 BD: "+str(n1))

Answer: There are various ways to earn money online in Bangladesh. Here are some options you can explore:

Freelancing: Freelancing is one of the most popular ways to earn money online in Bangladesh. You can offer your skills and services on various freelance platforms such as Upwork, Fiverr, and Freelancer. You can offer services such as content writing, graphic designing, web development, data entry, and more.

Affiliate marketing: You can earn money by promoting products and services through affiliate marketing. You can join affiliate programs of various companies such as Amazon, Clickbank, and ShareASale and earn commission on the sales made through your unique affiliate link.

You wrote a program to find the factorial of a number. In mathematics, the factorial operation is used for positive integers and zero. What does the function return if the user enters a negative three? def factorial(number): product = 1 while number > 0: product = product * number number = number - 1 return product strNum = input("Enter a positive integer: ") num = int(strNum) print(factorial(num))
-6
1
-3
There is no output due to a runtime error.

Answers

Answer: well it’s not “There is no output due to a runtime error”

Explanation: Put that and I got it wrong

The Answer Is 1.

Edge 2020.

What makes e-mail different from other forms of business communication?

Answers

Answer:

because it is an electronic mail

Answer:

Email can be both formal or informal however face to face communication is usually most effective in business.

whats the name of the windows 10 nucleus

Answers

Answer:

motheboard

Explanation:

AI structure question. Please help
Type the correct answer in the box. Spell all words correctly.


On what structure is an artificial neural network based?


An artificial neural network is based on interconnected _______.

Answers

Answer:

A). An ANN is based on a collection of connected units or nodes called artificial neurons, which loosely model the neurons in a biological brain. Each connection, like the synapses in a biological brain, can transmit a signal to other neurons.

B). Understanding an Artificial Neural Network (ANN)

Artificial neural networks are built like the human brain, with neuron nodes interconnected like a web. The human brain has hundreds of billions of cells called neurons.

Explanation:

Answer:

The answer to this question is Neurons

Explanation:

I took the test on Plato and got a 100%.

What are elements ?Give any five example​

Answers


Chemical element, also called element, any substance that cannot be decomposed into simpler substances by ordinary chemical processes. Some examples are carbon, oxygen, hydrogen, gold, silver and iron.

Technical environment refers to all the technological surroundings that influence organization. Technology consists of skills,methods,systems and equipment. It includes and innovations. It makes work more efficient. It is a means to transfer input into outputs.

Technology influences organizations by bringing about changes in jobs, skills, lifestyles, production methods and processes. Automation, computerization, robotics, informatics, biotechnology, laser, new materials and artificial intelligence have all influenced organizations.Information technology affects every function of within the organization.Organizations should be aware of technological changes tot avoid obsolescence and promote innovation.

Technological forecasting is also important.Technology reaches people through organization. It is a powerful force that shapes their destiny.

1)Level of technology: The level of technology can be appropriate or sophisticated. It can be labour-based or capital-based.The level of technology influence organizations.

Labour based technology: Human labour is mainly used for operations.

Capital based technology: Machinery is mainly used for operations. Technology is represented by automation, computerization, robotizing, etc.

2)Pace of technological change: Technology is a dynamic force. Its speed of change is accelerating. Invention, innovation and diffusion increase its pace. Organizations should adapt to changing technological forces. They should also upgrade the skills of their human resources to effectively cope with the demands of technological changes.

Technological change influences organizations in the following :

It can make existing industries obsolete.It can the rates of obsolescence.

It can rejuvenate the existing industries through product improvements or cost reductions.

It can create entirely new industries.

It can increase government regulations.

3)Technological transfer: Sources of technology can be within the organization, within the country or foreign countries. Technology transfer implies technology import for organizations.

Technological transfer implies technology imported from technologically advanced foreign countries. Its speed is important for organizations.

Globalization: Global companies are the key sources of technology transfer in developing nations.

Projects: Turnkey projects based on global bidding serve as a source of technology transfer.

Trade: This consists of the sale of equipment or machines by the manufacturer.

Technical assistance: Bilateral and multilateral donors under technical assistance provide international consultants who bring new technology with them.

Training and publication: They provide opportunities to about new technology.

Technological transfer influences organization by :

Increasing and decreasing costs.

New product development and product improvement.

Improving production systems and processes.

Better satisfaction of customer needs.

4)Research and development: R&D is the essence of innovation. The Expectation for improvement is increasing. Customers expect new products of superior quality which are safe, comfortable and environment friendly. This calls for increase research and development budget by organizations. Government and industry collaboration and spending in R&d efforts is also an important aspect of the technology environment.

I hope this helped!

Amy is not sure if the Web page loaded completely in her browser. She should look at the _____.

status bar
command toolbar
search engine
address bar

Answers

Answer:

Status Bar

Explanation:

A status bar will show the progress of the page that is being loaded.

Status bar It shows how much the page has loaded and how much it has left till fully loade

Can you guys list all the Linux Debian Apps that can only be installed on a Linux terminal command line, I have a deb 32 bit

Answers

Answer:

Two of those are apt and apt get and the other one is dpkg. 4. You will see a list of Debian Ensure package lists and installed packages are up to date. ... Apt may fail to remove old Linux kernels when using an Ubuntu version that 39 s ... To install it just enter the following command from the Terminal sudo apt install apt ...

Explanation:

which of these options highlights the need for learning algorithms
A. Algorithms help you draw neat diagrams
B. Algorithms help you create easily understandable programs
C. Algorithms help you learn assembly-level language
D. Programmers can code using algorithms only

Answers

Answer: D.

Explanation:

Answer:

The answer is B. Algorithms help you create easily understandable programs

Explanation:

I got it right

colour statement is used for setting .................... and .................. colors​
(a) screen,Paint (b) line,circle
(c) foregroung,Background
(d) none of these

Answers

Answer:

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

Explanation:

The correct answer to this question is C. i,e, foreground, and background.

First, we need to know what is a color statement.

The purpose of the color statement is to select display colors. It is used to select the foreground and background colors of the display.

So, the correct answer is :

Colour statement is used for setting foreground and background colors.

In general, it allows you to select foreground and background colors for a display. You can use different codes to display and see the effect of the color statement.  

While other options are not correct, because the color statement used to select foreground and background color for the display. It does not use for setting screen and paint color in it. It also does not use for drawing lines and circles etc.

What are the pros and cons for E-trade?

Answers

Answer:

Pros                                            Cons

• Free stock and ETF trading • Higher fees for non-free mutual funds

• Some mutual funds and bonds are free

• Low non-trading fees

Answer:

Pros-Quick, easy purchases, ability to know what's available, access to limitless products.

Cons-Potential to get hacked, get scammed by false advertising, amount of time to receive product

Explanation:

Its not a great list but I really hope this helps

Joann wants to save the building block she created for the title of her company.

In which file does she save this building block?

Answers

Answer:

Building Blocks.dotx

Explanation:

Just did it on Edge2020

Which of these should be included in a program's comments?

a. code to set the parameters of a shape

b. a description of what the program does

c. a description of how long it took to write the code

d. code for inserting a background

Answers

Answer:

B

Explanation:

Comments in code are primarily used to describe what the program does, and how chunks of the code running the program help relate to what the program does. Comments in code are not primarily used for answers d & a, which is more code, since if you comment, the compiler doesn't notice the code, so it doesn't work. Comments in code are not used for c either, since it's not really needed to write that in the comments.

What is a characteristic of tasks in Outlook?
The Tasks view can be seen by clicking the View tab.

New tasks are created in the Appointments form

Tasks are an action item in Outlook and are basically a to-do list.

Old tasks are automatically deleted from your list​

Answers

Answer:

C. Tasks are an action item in Outlook and are basically a to-do list.

Explanation:

A to-do List is just a list of tasks.

and I took the test and got it right

Answer:

C. is correct

Explanation:

edg 2021

1. What sort of information should be taken by the human resource before
leaving for foreign employment? Write in brief.​

Answers

Answer:

DDDDDDDDDDDDDDD

Explanation:

Answer:

Sources of information on foreign job opportunities. Blue, newspapers or professional journals; Red, personal contacts abroad; Green, recruitment websites.

Explanation:

You want to add a picture of a potential new office layout to the title page of a proposal. How can you adjust the size of the image without changing its proportions?

Answers

Answer:

You can adjust the size of an image without changing its proportion by holding down the shift key while adjusting one of the edges.

okay all the people that make other people cry leave me alone got it good

Answers

Answer:

YESSS

Explanation:

So many people have made me cry!!

What is the main citation style for English and humanities classes? Modern Language Association style (MLA) American Psychological Association style (APA) .edu style (EDU) .gov style (GOV)

Answers

Answer:

MLA

Explanation:

Answer:

A) Modern Language Association style (MLA) Is your answer!

Explanation:

If you think about it the other answers either don't fit or don't make sense! :)

Hope this helps! :)

Discuss one simple example of hybrid computer.​

Answers

Answer:

thermometer , petrol pump

How can you continue learning about computer science and improve your coding abilities?

Answers

Answer:

5 Ways to Improve Your Coding and Programming Skills

Take advantage of books and other free resources. ...

Sign up for a bootcamp. ...

Practice, practice, practice. ...

Engage with the computer science community. ...

Pursue a formal education in computer science.

What is the purpose of i in the code?

for (var i = 0; i < fruitList.length; i++ ) {
console.log (fruitList [ i ] );
}

Answers

Answer:

i is a variable used to store information in this case the number 0. The i is then added to repeatedly to create a list.

The most commonly used auxiliary storage device(s) is/ are _____.
a.
floppies and tapes
b.
a filing cabinet
c.
hard disks and floppies
d.
tapes and hard disks

Answers

Answer: A

Explanation:

Which unit of measurement is used to express the capacity of a servo motor?
A. kg/hr
B. kg/m
C. kg/cm
D. kg/km

Answers

Answer:

C. kg/cm

Explanation:

I just did it

Name any two operating systems you know.

Answers

Answer:

software and hardware

2 operating systems are windows and iOS

Circuit pruning occurs only before puberty.
O True
O False

Answers

Answer:

False

Explanation:

Answer:

The answer is false goodluck6

Which statement about technology before the invention of the printing press is true?

Answers

Answer: See explanation

Explanation:

You didn't give the options to the question and I searched and couldn't find the particular question.

Here, are some of the things about technology before the invention of the printing press.

1. Before printing press, monks copied books such as bibles as they'll copy calligraphy and illustrations in order for them to spread the messages in the Bible across to people.

2. Before printing press, oral communication was the way that people communicated with each other.

3. Drawings and writings were done by hand before printing press.

4. Before the invention of printing press, in order to transcribe books, different materials that were used include wax, parchment, clay and papyrus.

Which careers require completion of secondary education, but little to no postsecondary education? Mathematical Technicians and Mechanical Engineers Sociologists and Electronics Engineering Technicians Food Science Technicians and Zoologists Nondestructive Testing Specialists and Surveying Technicians

Answers

Answer:

Nondestructive Testing Specialists and Surveying Technicians

Explanation:

A nondestructive testing specialist and surveying technician refers to an individual who is saddled with the responsibility of providing services such as the inspection of structures (aeroplane, dam, trains, reactors, bridges), machines or equipments, and raw materials in order to check for problems or any defective part.

Hence, Nondestructive Testing Specialists and Surveying Technicians is a career that requires the completion of secondary education, but little to no postsecondary education because they use equipments mainly to find detects and gather details about any problem.

Answer:

D is correct on test review

who got houseparty and tryna play uno

Answers

Answer:

awww shiiiii yessss

What can you add to your presentation from the Insert tab?

Animations
Pictures
Variants
Transitions

Answers

Answer:

B. PICTURES

Explanation:

Answer:

I know its late but pictures is the answer.

Explanation:

I took the test and got it right.

Other Questions
i wil give you a brainlyest if you help me and five stars simplify the expression like terms 2(x+6)+3x+4= does antony truly mean what he says about the conspirators being honorable? Explain. what does ir + a + definition mean?heres the sentence i puled it from2. Write your sentences using ir + a + destination, tener, gustar, the 24-hour clock and the 12-hour clock Factor the Expression. 121x + 44 *11(10x + 4)21x + 411(11x + 44)11(11x + 4) Use evidence to describe what you learned about the culture of theAztecs by studying the Templo Mayor. Soccer shoes grip the turf because they have class is a adverb clause or adverb phrase Why do you think prokaryotic cells do not have all the organelles that eukaryotic cells do? What does this tell you about prokaryotic cells? Could someone give me some input on why in part B 10 to the power of 3 is included in the equation to obtain the answer 1.47 x 10 to the power of 11 y=4x+25 find the domain of the function and if it discrete Does Gatsby achieve the American Dream? If yes, when exactly can he say that he reaches it? If not, what prevents him from truly achieving it? Explain. Mya creates thetable below toshow how muchfruit to put in hershake. How muchfruit should sheuse if she ismaking 5 servings? The diagram shows a periscope used to see objects that are behind or under a barrier. What makes it possible to see an object when looking through a periscope? The periscope A. contains mirrors that reflect the objectB. magnifies small objects so they can be seenC. absorbs the light rays passing through itD. separates the light into different colors Based on this evidence, what might you infer about the importance of Armistice Day toAmericans?A. Armistice Day became increasingly important to Americans after 1919.B. Armistice Day became less and less important to Americans after 1919.C. Armistice Day was never very important to Americans.D. Armistice Day was important to just a few Americans. Ruth won young star award in which year ? Genetic information is stored and transmitted withinA.nucleic acids.B. proteins.C.amino acids.D.sugars. Match the following enzymes involved in DNA replication with their functions.a. DNA ligaseb. DNA polymerasec. DNA gyrased. helicase What is the initial cost of the car? Why did Sam cook want to become a singer? Where can i buy ps5 Can someone help me with the questions in the picture??