Question
somevody help please A student object consists of: FirstName: string LastName: string Birthdate: tuple, such as (1,17,1998) TechID: string Grades: list of tuples, such as
somevody help please
A student object consists of:
FirstName: string
LastName: string
Birthdate: tuple, such as (1,17,1998)
TechID: string
Grades: list of tuples, such as [(3127,C,4),(2496,B,3),(6703,D,3)]
So one student might look like this:
FirstName: Bob
LastName: Smith
Birthdate: (2,17,1998)
TechID: 43546578
Grades: [(5930,B,4),(7660,C,4),(3122,C,3),(5438,C,2),
(6730,C,4),(4268,C,4),(5709,D,4),(8071,B,4)]
The data for each student can be found in the text files. Your program should read the data from each of the files, as appropriate. (Do not change the format of the input files.) Your getData function should read in *all* of the data, at one time. And once all of the data has been read into an appropriate structure, that data should be passed back to the main program. Your program should not go back-and-forth between reading data and returning data.
Create a list of students. Do not process the students one-by-one as they are created or as they are placed in the list. Create a student, add it to the list of student objects, repeat. Once the list of students is complete, go through the list to output the report on each student.
You will need three methods for processing a student object.
currentAge: How old is the student? Be sure to use the Python module.
Hint:
import datetime
now = datetime.datetime.now()
print (now.year)
currentGPA: What is the students GPA?
3. Report: Add the output for that student to the output file.
Each output file item should look like this, using the above student as an example:
Bob Smith (#43546578)
Age: 18 (02/17/1998) ? note the mm/dd/yyyy format
GPA: 2.14 (29 credits)
There will be at least three Python files one for getData, one with the student class and its methods, and one with the main program.
gradesSample.txt
87965219,4348D4 87965172,5214B4 87965164,6576C2 87965219,8529B3 87965220,3417C3 87965219,7834C3 87965219,5383D3 87965220,3747B4 87965164,2645C4 87965164,8239C4 87965187,2852A4 87965219,5007A4 87965220,6866B3 87965187,8138C4 87965164,6751A4 87965172,2129C4 87965164,7874D4 87965164,5555D4 87965172,4767A4 87965164,8983C2 87965219,4375B3 87965220,5369C4 87965187,5824D3 87965187,3972A4 87965172,6901C3 87965219,2029C3 87965164,5052C4 87965187,3569C4 87965164,7513C3
studentsSample.txt
87965164,Paris,Yu,6/27/1997 87965219,Heath,Moss,10/13/1996 87965187,Cale,Blankenship,10/22/1995 87965220,Terrence,Watkins,12/7/1996 87965172,Ansley,Padilla,3/30/1997
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