Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are writing a program to collect data for the payment file. The data must be validated. Input: Name, Account Number and Payment Amount. Rules:

You are writing a program to collect data for the payment file. The data must be validated. Input: Name, Account Number and Payment Amount. Rules: Name cannot be blank Message: Name cannot be blank Must be at least 2 character long Message: Name to short Must be alphabetic Message: Name must be alphabetic Account number Cannot be blank Message: Account number cannot be blank Must be numeric (digits) Message: Account number must be numeric Must be 9 digits long Message: Account number must be 9 digits Payment amount Cannot be blank Message: Payment cannot be blank Cannot be negative Message: Payment cannot be negative Cannot be zero Message: Payment cannot be zero Issue error message if an error is detected for any of the inputs You as the programmer create the valid error messages Output: name with message, account number with message and payment with message Example output: (good) Name: John Smith valid Account Number: 123456789 Valid Payment: 10.74 valid (error) Name: John Smith valid Account Number: 12345 Invalid: Account number must be 9 digits Payment: 10.74 valid (error) Name: Invalid: Name cannot be blank Account number: 123456789 Valid Paymment: 0 Invalid: Payment cannot be zero. USE VALIDATION CONCEPT IN PYTHON

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago