Question: Please write a code using python with this requirement - Function main For coding style, remember to create/use a descriptively named constant in place of
Please write a code using python with this requirement

- Function main For coding style, remember to create/use a descriptively named constant in place of 600000 (see next bullet) - generate a random income (integer) in the range [0,600000]. Call getHighestIncomeTaxRate with the income. getHighestincomeTaxRate will return the tax rate (integer) to main. Display the income and tax rate in the format shown in the sample runs. - Function getHighestincomeTaxRate Accepts an integer as a parameter representing an income. Returns an integer representing the tax rate. Only one return statement is permitted. Has header documentation. The assumption (@precondition) to be included is that the income is >=0. Note that function header documentation is written independently of how it is called. For example, it would not refer to main because it is to work for any method that calls it correctly. Similarly, it would not discuss that income was randomly generated, because it should work no matter if the income was originally randomly generated, input from a user, read from a file or database, etc. Here is an example of method header documentation that you may use for this program: Tax rate table (You may enter these numeric literals into your code - no named constants required) FYI: Using logical and in conditional expressions is ok, but this can be done without and. Make your code efficient in that one multiway branching if statement is much better than several single way branching if statements. - As always, follow proper coding style, but note the following: - Documentation is required in only two places: The file header documentation and the function header documentation for getHighestIncomeTaxRate - Named constants are not required for the numeric literals in getHighestincomeTaxRate - Match the exact output in the sample runs (See next page). - Strategy: To test getHighestincomeTaxRate initially, send it non-random values. Try boundary values values on the edge of changing to a different rate. When testing completes, then send it the randomly generated values and remove any leftover testing code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
