Question: Python: Stock Pricing The DOW Jones stock ticker has been on a roller coaster ride these past 12 months. A local hardware store has invested
Python: Stock Pricing The DOW Jones stock ticker has been on a roller coaster ride these past 12 months. A local hardware store has invested deeply into the bond market. In order for us to simulate any stock prices we can write a simple program using a list and either While or For loop to store 100 random values into each element in a list. Whenever you get a random number, you are assuming you have received the price of a stock that this hardware store is interested. You need to write a program that will randomly generate 100 different stock prices using a list ranged from (40 to 180) inclusive. Next, calculate the average stock price, the highest price, and the lowest price of the stocks in the list. Lastly, print out what you found.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
