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
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