Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will prepare a 5-year Sales Projection. User will be asked for the following 3 inputs: Sales Amount: This is a decimal value and must

You will prepare a 5-year Sales Projection. User will be asked for the following 3 inputs:

Sales Amount: This is a decimal value and must be greater than Zero. Check using an IF statement and print an error message if the Sales Amount is not greater than Zero. (2 points)

Growth Rate: This in an integer value. It can be any integer including negative integers and zero. The user will enter an integer value. However, you will then need to divide it by 100 to make a percentage to use in your calculations. So, if the user enters 10, you divide it by 100 to make it 10% or .10 (2 points)

Sales Period: This is used to indicate if the Sales Amount entered above is for a monthly or quarterly period. The user must enter m or M for monthly sales. Or, the user must enter q or Q for quarterly sales. Check using an IF statement and print an error message if the Sales Period is invalid. (4 points)

Ensure that you convert inputs to integer or decimal value as appropriate. Also ensure that Sales Period is case-insensitive; that is, it does not matter if the user enters a capital letter or a small letter. Check that the values are within the appropriate range using IF statements.

Explain the Errors, if any, to the user using print statements. Do NOT use TRY-EXCEPT-FINALLY statements when checking for errors. I want you to use only IF statements and ignore other sources of errors.

If the sales period is monthly, multiply by 12 to get Annual Sales. If the sales period is quarterly, multiply by 4 to get Annual Sales. If the user has entered anything other than monthly or quarterly, multiply by 0 (in other words, make Annual Sales equal to Zero). (2 points)

If the Annual Sales are greater than Zero (2 points), then use a FOR-RANGE loop (3 points) to output projected sales for five years starting with year one. Note: Sales Growth is compounded. This means that sales projection are based upon prior years sales. (2 points)

Assume that the inputs are as follows:

Sales Amount: 100

Growth Rate: 10

Sales Period: Q

Then, the output will look something like the following (use either of the two print methods that I have covered in class to generate the output): (3 points)

Projected Sales in Year 1 are 400.

Projected Sales in Year 2 are 440.00000000000006.

Projected Sales in Year 3 are 484.0000000000001.

Projected Sales in Year 4 are 532.4000000000002.

Projected Sales in Year 5 are 585.6400000000003.

NOTE: You are writing a program where any valid input should work, not just the sample input shown here.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

ISE Business Accounting

Authors: Frank Wood, Alan Sangster

8th Edition

0273638408, 9780273638407

More Books

Students also viewed these Accounting questions

Question

Question 1 (a2) What is the reaction force Dx in [N]?

Answered: 1 week ago