Reference no: EM131174931
Task-
An insurance company wants to get a rough estimate of their annual car insurance income. The company has three types of car insurance as: basic, intermediate and comprehensive. Write a program that will ask the user to enter the insurance company name, year, the number of insurance policies sold of each car insurance type. The average insurance premiums of each car insurance policy type are $500, $650 and $800. The above prices include a 10% Goods and Services Tax (GST). Finally, the program should display the amount of annual earned for each car insurance type (excluding the GST) and the total amount of money earned for all the three car insurance types. Then, the program should prompt the user with the message "Do you wish to repeat for another year? [Y/N]: ". If the user selects 'Y' or 'y' the program should repeat. If the user selects 'N' or 'n' the program should terminate and print 'Thank You! ------ See You Again!'
Notes: you are expected to use selection, repletion and functions in this program.
Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. You may specify the algorithm for the functions separately and refer to the function name in the algorithm for the main program. Your program design should include constants, selections, repletion and multiple functions.
Specify 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the 'abnormal' operation of your program. Set these out in the same format as in Assignment.
Implement your algorithm in Python.
Use separate functions to perform the task, instead of having only one single main function.
The 'main' function should prompt for user input and then call other function/s that calculates the income generated. Make sure your program has both a 'main' function and at least one other function that is called from the 'main' function to calculate the income. Remember to call the 'main' function at the bottom of your program or it will not execute.
Use triple quoted 'docstrings' to document your function, and add other 'end of line' comments as necessary to explain your code.
Run your program using the test data you have selected and save the output it produces in a text file.
Submit:
1. Your algorithm.
2. The table recording your chosen test data.
3. Source code for your Python implementation.
4. Output listings demonstrating the results of using the test data.
It is important that the output listings are not edited in any way.
Rationale
Reinforce topic material on simple functions.
Reinforce topic material on decision structures and Boolean logic.
Python Based assignment, please use Python v3.3.2.
Compute the energy loss over a length of 1.80 m
: Then, compute the energy loss over a length of 1.80 m. Assume that the surface roughness is similar to that of commercial steel pipe.
|
What are the break-even stock prices at expiration
: Generous Dynamics stock currently sells for 73.0 dollars per share. Consider the following portfolio of options on Generous Dynamics stock: -- short one call option with strike price 72.0 and price 7.2615 -- short two put options with a strike price ..
|
Projects based on the profitability index
: You are considering two mutually exclusive projects. Project A has cash flows of -$74,900, $18,400, $26,300, and $57,100 for years 0 to 3, respectively. Project B has cash flows of -$79,000, $18,400, $22,700, and $51,500 for years 0 to 3, respectivel..
|
What are the costs and benefits of the policy
: What are the costs and benefits of the policy? What are the risks of enacting or not enacting the policy? How will the lives of people who are affected by the health issue change if this policy is enacted?
|
Program that ask user to enter insurance company name
: Write a program that will ask the user to enter the insurance company name, year, the number of insurance policies sold of each car insurance type. The average insurance premiums of each car insurance policy type are $500, $650 and $800
|
What is the minimum value of this bond
: A convertible bond has a 6.5 percent coupon, paid semiannually, and will mature in 10 years. If the bond were not convertible, it would be priced to yield 5.5 percent. The conversion ratio on the bond is 25 and the stock is currently selling for $51 ..
|
How much gain or loss resulted from the sale
: A person owned 300 shares of MNO common stock, which cost $23,400.- How much gain (or loss) resulted from the sale?
|
Identify transition points or conflicts in your gender role
: Describe your experiences with sexism or lack of experiences with sexism. How does this relate to what the scientific community says about transitions, conflicts, and challenges?
|
Whether firm raises financing as equity or debt
: The M&M theory states it does not make any difference from an economist’s view whether a firm raises financing as equity or debt. However floatation costs are more for equity than debt and interest on debt is tax deductible whereas dividends are not.
|