Question
Inside a series of text files you are required to create a data set for N people. Where N is a random integer between 30
Inside a series of text files you are required to create a data set for N people. Where N is a random integer between 30 and 130. The text files should contain work grade information for each person for work 1, work 2, lab, last work and attendance information. There should be a total of 5 data files. In each file the first column will contain student numbers. These numbers will have the form 2022abcd for all the people in the list where abcd is a random 4 digit integer. Note that in the number abcd the first digit should not be zero. For the attendance file, attendance information for each person should be created. We will assume that the class is taught three hours each week and semester is 14 weeks long. Attendance information is generated using random numbers between 0 and 1. The person is assumed to have entered the class if the random number is greater than equal to 0.8. The person would miss the class otherwise. For the work 1, work 2 and last work files the second and other columns in the will contain points received from questions by the students and then the work grade at the last column. The number of questions in each work can change between 3 and 6. You should specify the points for each question, which should be clearly mentioned in each file. Note that the total points of the questions should add up to 100. The points each person received from questions will be a random integer between 0 and the point specified for that question. Note that if a students attendance is less than 70% then that persons last work grade should be zero. For the labwork part there will be 12 lab assignments each of which will be 10 points worth. Labwork grade should be a random integer between 0 and 10. Develop a computer program which would read these data files and calculate the total grade from the course for each student. The weight of the each item for total grade calculation is; work 1 25 %, work 2 25%, lab 15% and last work 35%. The total grades should be rounded to integers. After this, your program should specify the letter grade for each student. The rules for letter grade distribution are as follows: (Note that these rules are not necessarily the rules applied in our university) 1. Any body, whose attendance is less than 70% of the overall number of lectures, will receive a DZ grade. 2. Anybody, whose last work grade is zero, will automatically receive FG. 3. Anybody, whose last work grade is greater than zero but less than 35, will automatically receive FF. 4. Anybody whose lab grade less than 20 will also automatically receive FF. 5. For the rest of the class excluding the people who failed at the first four steps, you would calculate the arithmetic average (mean) and standard deviation of the grades. 6. You will set CC grade to the corresponding mean grade you calculated in the previous step. Then you would add 60 % of the the standard deviation to mean to set the starting point for the CB grade. Adding 60 % the standard deviation once more would yield the starting point for the BB grade, etc 7. For the grades lower than CC (DC, DD, FD) you would successively subtract 60 % of the standard deviation from the mean grade. After the letter grades are calculated the program would ask the user what type of information is asked for using a menu. The program should ask the user whether the user wants to see overall grade distribution or grade information for an individual. If the user selects to see overall grade distribution your program should write in a text file; the number of people who received AA, the number of people who received BA, etc for all grades. The program should also write the number of people who passed and the number of people who failed into the text file. You should design the format of the output such that it should be neatly written and explanatory. Your program should also produce three figures. 1) A pie chart for letter grade distribution, 2) a histogram of letter grades, 3) An x-y plot which shows the total grades students with a square symbol along with a horizontal solid line showing the mean of the class calculated in step 5 above. The name of the text file should be class_info with the extension of txt or dat. If the user selects to see grade info for an individual, your program should ask for the ID number of the person. If the user enters an ID number which is not in the list, then the program should warn the user and ask to enter the ID number again. The program should continue to warn the user until the user enters correct ID number. When the user enters a valid ID number the program should give the grade information. For grade information your program should write the work grades (work 1, work 2, lab, last work , total grade, letter grade) and attendance information of the student in a text file as a table. If the students attendance is less than 70%, then there should be a note at the end telling that the student failed due to insufficient attendance. You should design the format of the output such that it should be neatly written and explanatory. The name of the text file should be the ID number of the student with the extension of txt or dat.
Chegg doesn't allow some words so I made some corrections but generally the question is like this. I need to write such a program, please post the codes and details. I'd appreciate it if you could check if it's working.
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