Question: 4 . Write a program for a driving school. Your program will enter the details of many students, and then print out all the details
Write a program for a driving school. Your program will enter the details of many students, and then print out all the details using Python.
Input
In real life, you might use a form for entering data, but for the sake of this exam question, please use the input function.
For each student record, the user of your software needs to enter the following fields in order:
permitnumber: the student'slearners permit number issued by the state.
firstname: the given name of a driving student of the school.
lastname: the surname of a driving student of the school.
dateofbirth: the date of birth of the student.
Input is terminated using a permitnumber of "END".
Validation as part of the Input
You will need to validate the following fields:
the learner's permit number needs to be valid. See isgoodpermitnum below. The permit number must be a ninedigit number. The first digit must be
the given name and surname must not be empty strings.
the date of birth needs to be a valid date. We assume the user will enter the date of birth as a single string according to the format: yearmonthday. eg Please leave this date as a string. Do not convert it to a date object. See isgooddate and requirements below. You should validate:
year
month
day daysinmonth
daysinmonth if the month is or
daysinmonth if the month is or
daysinmonth if the month is Leap year is not considered in the question
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
