Question: Please write the program in python Write a program that loops, prompting the user for their name, their year of birth, and the value of

Please write the program in python
 Please write the program in python Write a program that loops,

Write a program that loops, prompting the user for their name, their year of birth, and the value of their vehicle, and then writes that data out to file called Customers,.txt: The program should check inputs for validity according to the following rules: First and last names must be alphabetic. No spaces or special characters. Names must be less than 20 characters long. Year of birth must be a four-digit number that starts with 19 or 20. It cannot be greater than the current year ( Value of the vehicle insured must be a positive floating point number in the range 0.00 to 1000000.0 inclusive The file should record each customers information on a single line and the output ile should have the following appearance. Nurke Fred 1958 24000 cranium Richard 1998 1500 Write a second program that opens the'Customers.txt file for reading and then reads each record, splitting it into its component fields and checking each field for validity. The rules for validity are as in your first program, with the addition of a rule that specifies that each record must contain exactly 4 fields. Your program should print out each valid record it reads. Your program should terminate when it reads an invalid record, printing out on which line number the error occurred, and what the error was

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!