Question
Python programming A programmer writes a program to calculate a stock indexand incorrectly truncates the indexafter 2 decimal places , rather than usingcorrect rounding. In
Python programming
A programmer writes a program to calculate a stock indexand incorrectly truncates the indexafter 2 decimal places, rather than usingcorrect rounding. In other words a stock valueof 1000.54321 is replaced by 1000.54.
The program is applied in an automated trading program whichrecalculates the stock index everyminute during the normal tradinghours (10am to 4pm) forthe 250 trading days in a year.
Write a Python program to estimate the error in the resultingestimate of the index.
The output from your program should look like this:
Instructions Problem A programmer writes a program to calculate a stock index and incorrectly truncates the index after 2 decimal places, rather than using correct rounding. In other words a stock value of 1000.54321 is replaced by 1000.54. The program is applied in an automated trading program which recalculates the stock index every minute during the normal trading hours (10am to 4pm) for the 250 trading days in a year. Write a Python program to estimate the error in the resulting estimate of the index. The output from your program should look like this: Stock Exchange Index Error: ANSWER where ANSWER is the correct answer to the calculation. Prob f X y Z d S Instructions Problem A programmer writes a program to calculate a stock index and incorrectly truncates the index after 2 decimal places, rather than using correct rounding. In other words a stock value of 1000.54321 is replaced by 1000.54. The program is applied in an automated trading program which recalculates the stock index every minute during the normal trading hours (10am to 4pm) for the 250 trading days in a year. Write a Python program to estimate the error in the resulting estimate of the index. The output from your program should look like this: Stock Exchange Index Error: ANSWER where ANSWER is the correct answer to the calculation. Prob f X y Z d S
Step by Step Solution
3.57 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
Solution Here we will use round function in Python to estimate th...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started