subject

Python 3 ... Blocks of Stock. A block of stock as a number of attributes, including a purchase date, a purchase price, a number of shares, and a ticker symbol. We can record these pieces of information in a tuple for each

block of stock and do a number of simple operations on the blocks.

Consider the following portfolio.

We can represent each block of stock as a 5-tuple with purchase date, purchase price, shares, ticker

symbol and current price.

portfolio= [ ( "25-Jan-2001", 43.50, 25, 'CAT', 92.45 ),

( "25-Jan-2001", 42.80, 50, 'DD', 51.19 ),

( "25-Jan-2001", 42.10, 75, 'EK', 34.87 ),

( "25-Jan-2001", 37.58, 100, 'GM', 37.58 )

]

Develop a function that examines each block, multiplies shares by purchase price and determines the

total purchase price of the portfolio.

Develop a second function that examines each block, multiplies shares by purchase price and shares by

current price to determine the total amount gained or lost.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
You know the right answer?
Python 3 ... Blocks of Stock. A block of stock as a number of attributes, including a purchase date,...
Questions
Questions on the website: 13722367