Computers and Technology
Computers and Technology, 18.04.2021 21:00, lalacada1

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 19:00, Heyitsbrandi
Now youÒ€ℒre on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx, fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx, fs) does automatic scaling and then calls sound(xx, fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
Answers: 1
image
Computers and Technology, 23.06.2019 21:30, mariah10455
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
image
Computers and Technology, 24.06.2019 10:40, 29delphina
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
image
Computers and Technology, 24.06.2019 10:50, latresyn
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
Do you know the correct answer?
Python 3 ... Blocks of Stock. A block of stock as a number of attributes, including a purchase date,...

Questions in other subjects: