For this lab you will do 2 things: Solve it using pseudocode (no python syntax allowed) Code it in Python - must use decision structure and conditional loop Auto Insurance Problem Write a program that prompts the user for his/her age and marital status. Use the following menu for the user to choose marital status: Married Single Then calculate and display a rate for auto insurance using the following rules: Age Married Rate Less than 25 No $800.00 Less than 25 Yes $700.00 Greater than or equal to 25 No $500.00 Greater than or equal to 25 Yes $450.00 Input validation: The user must choose a valid choice from the menu and the user’s age must be at least 16. Use try ... except to make error statements for TypeError and NameError..
For this lab you will do 2 things: Solve it using pseudocode (no python syntax allowed) Code it in Python - must use decision structure and conditional loop Auto Insurance Problem Write a program that prompts the user for his/her age and marital status. Use the following menu for the user to choose marital status: Married Single Then calculate and display a rate for auto insurance using the following rules: Age Married Rate Less than 25 No $800.00 Less than 25 Yes $700.00 Greater than or equal to 25 No $500.00 Greater than or equal to 25 Yes $450.00 Input validation: The user must choose a valid choice from the menu and the user’s age must be at least 16. Use try ... except to make error statements for TypeError and NameError..
Chapter2: Using Data
Section: Chapter Questions
Problem 2CP
Related questions
Question
For this lab you will do 2 things:
- Solve it using pseudocode (no python syntax allowed)
- Code it in Python - must use decision structure and conditional loop
Auto Insurance Problem
Write a program that prompts the user for his/her age and marital status. Use the following menu for the user to choose marital status:
- Married
- Single
Then calculate and display a rate for auto insurance using the following rules:
Age |
Married |
Rate |
Less than 25 |
No |
$800.00 |
Less than 25 |
Yes |
$700.00 |
Greater than or equal to 25 |
No |
$500.00 |
Greater than or equal to 25 |
Yes |
$450.00 |
Input validation: The user must choose a valid choice from the menu and the user’s age must be at least 16.
Use try ... except to make error statements for TypeError and NameError..
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT