Question: Using Python 3.5 [DO NOT COPY/PASTE THE WRONG SOLUTION FROM PREVIOUSLY ANSWERED QUESTION] Input Validation [DO NOT USE TRY/EXCEPT] The input data will only be

Using Python 3.5 [DO NOT COPY/PASTE THE WRONG SOLUTION FROM PREVIOUSLY ANSWERED QUESTION]

Input Validation [DO NOT USE TRY/EXCEPT]

The input data will only be the phone name, sales price, and chipset (either Qualcomms Snapdragon

810 or Kirin 940) and which currency conversions the users wishes to do.

Validate input

to make sure the user gives valid inputs. Display an appropriate message if invalid data is

entered. Here are the rules for data validation:

?The phone name must begin with an alphabetic character. Other than that it can contain

alphabetic characters, numeric digits, and spaces, but no other characters.

?The sales price can contain a dollar sign, but other than that it must be numeric. Also, the sales

price must be at least $100. It may include dollars and cents.

?The chipset must start with either S, s, k or K. It doesnt matter whether the user enters

upper case or lower case, and it doesnt matter if they enter the whole word or just the first

letter, but your validation statement should only check against an upper case letter (for

example,

think about what youll do if the user enters snap).

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!