Question: Write a program that creates and calculates data about students at a certain university. Each part should present its name and goal as output. The
Write a program that creates and calculates data about students at a certain university.
Each part should present its name and goal as output. The functionality should be as follows:
Part I - Students GPA
- Ask the user how many students are in the university (assume there are 100 for the practice)
- For each student, randomly assign an ID number from 10001 to 99999 and a GPA score from 0.0 to 4.0
- Calculate and output:
- The mean, median and mode for the GPA scores. For mode, include also quantity.
- How many students are in the top 10% and how many are at the bottom 10%? Output their ID numbers and respective GPA scores
- Modify: ask the users what percentage of students they would like to modify (in a form of decimal number. E.G. 0.65 for 65%) and what should be the new minimum and maximum GPA for this groups of students.
- Based on the input, adjust the existing GPA values and display again:
- The mean, median and mode GPA scores.
- How many students are in the top 10% and how many are at the bottom 10%? Output their ID numbers and respective GPA scores
Part II - Read student names
Ask the user for a file containing possible first names (for this exercise use firstnames.txt attached to the assignment or download it from here: https://drive.google.com/file/d/1U-eOg8znWEoOcIPOWTT8due-svjNdnPc/view?usp=sharing).
Read the file for all the names. Remember the names are not case sensitive and some may appear a few times.
Calculate and output:
- How many unique names are in the file? Number only
- Which names appeared more than once? Output the names and how many were omitted.
- What is the longest and shortest names (in terms of number of letters)? Display the names and lengths (all the possibilities)
- For each student, assign a first name. What is the most and least common names? How many of each?
- Part III - write student data
In this part the program should create a .csv file and fill it with generated student information.
The program should:
- Ask the user for a name for the .csv file (use your own name for the exercise)
- Create the .csv file with columns named - ID, first-name, GPA
- Based on the information received in part I, generate and fill students information in the CSV file
- Tell the users how many lines are filled with values in the .csv file and ask how many to present
- Output the values based on the user input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
