Question
Python-Please answer all parts of the question. Assume you are going develop an application for a website to convert area code to state in the
Python-Please answer all parts of the question.
Assume you are going develop an application for a website to convert area code to state in the table below. The application will enable users to enter an area code, which will then be matched to the corresponding state. The mapping rule for this conversion is as follows:
Area Code | State |
907 | Alaska |
808 | Hawaii |
208, 986 | Idaho |
202, 771 | Washington, DC |
304, 681 | West Virginia |
385, 435, 801 | Utah |
Write a program that prompts the user to enter an area code and displays its corresponding state.
Sample Run 1: Enter an area code: 208 The corresponding state is Idaho
Sample Run 2: Enter an area code: 404 Sorry. The area code you typed does not exist in our database.
Sample Run 3: Enter an area code: 40a Sorry. The area code you typed does not exist in our database.
|
A. [5 points] System Analysis: What is(are) the input(s) and output(s)?
B. [5 points] Assume you are going to use a single MULTIPLE way decision selection statement. What should be the condition for displaying the state Idaho? How to represent it using a Boolean expression (may use logical operator) in Python?
****Let us follow our plan in question B and complete questions C-E***
C. [5 points] System Design: List the steps to get output(s) from input(s)
D. [5 points] Write your program and put your source code here.
E. [2 points] A screenshot of the output of program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started