Question: Write a program to get the input premium from the users. Prompt the user for the vehicle value and driver age in the top level

Write a program to get the input premium from the users. Prompt the user for the vehicle value and driver age in the top level code. Pass the vehicle value and driver age to the function as arguments, and return the correct premium from the function to the calling code. Print out the premium charged from the calling code. You can assume drivers age range for premiums
Write another function that calculates GST for the premium returned by the first function. Pass the value of the premium to the function, and return the amount of GST charged (10% of premium value). Print the value of the GST from the calling code.
Make your program loop, prompting the user for whether they would like to calculate another premium. Keep track of the total value of premiums sold, and the total value of tax paid. When the user exits, print out the total value of premiums, and total tax paid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!