SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
Hello,
Please help me answering this question by using python.
Overview
For this assignment, you'll be reading grade data from a file, determining student letter grades,
and writing the results to a new file. The details for how your program should work are described
in the Basic Requirements and Advanced Requirements sections below.
Input Data. A sample input data file of the type that your program should process is available
here: sample_grade_input.txt. This sample file contains fake grade data for 14 students.
However, your program should be able to work with a file with an arbitrary number of students.
For example, I may test your program with just 3 students, or with 300. Your program should
work for any length file.
Each student record spans 3 lines in the data file. The first line contains the type of student:
GRAD or UNDERGRAD. This is important because graduate and undergraduate students get
graded differently at UNC. The second line contains the student's name. The third line contains
the student's overall numerical grade. Your program will need to map these to letter grades
according to the following rules:
For the sake of this assignment, GRAD student grades are defined as follows:
For the sake of this assignment, UNDERGRAD student grades are defined as follows:
Please note that grades for this course are assigned as outlined in the course syllabus. The
grading scales specified above are for use only in the context of this assignment.
Output Data. Your program should write the results of its computations to an output file. An
example of the required output file can be found here: sample_grade_output.txt. This sample file
contains fake grade data for 14 students. Each student record spans 2 lines in the data file. The
first line contains the student name. The second line contains the student's letter grade.
Basic Requirements
Your program should perform the following:
Prompt the user to enter the name of the input file, making sure that the file exists and asking the
user to re-enter a filename if needed.
Prompt the user to enter the name of an output file. The output file should be erased/overwritten
if an old one with the same name exists.
Read the input file, assign grades as appropriate for the type of student (GRAD vs.
UNDERGRAD), and write the output to file.
Gracefully handle errors in the input file. In particular, your program should catch errors such as
invalid numbers for grades, or student categories that are not "GRAD" or "UNDERGRAD". If
found, the program should display an error message telling the user what the problem was. The
program should then stop processing the rest of the data file and tell the user to fix the problems
before retrying. During grading, your program will be tested with input files that have had errors
intentionally introduced. It is suggested that you try this in your own testing to make sure that
your program works as expected.
Two kinds of output should be produced by your program. First, an output data file should be
created using the same format described in the "Output Data" paragraph of the Overview section
above. Second, your program will produce output on the console in the form of status messages
and prompts for user input. The output produced by your program should be nearly identical to
the sample output provided below. While the specific data (names, grades, etc.) will vary based
on the input provided, the data formats, prompts, and messages printed to the console when using
your program should match those in the sample output files to receive full credit.
Please Note: Your program should use the flow control and conditional constructs that have
been discussed in class to "stop processing the rest of the data file." In this way, the program
should continue to run until the end, with your logic telling the program what to do (or what not
to do). You should NOT use any special Python functions to "immediately stop" your program
(e.g., using sys.exit() or a similar function is not allowed).
Advanced Requirements
Expand on the basic requirements by extending your program as follows.
Allow the user if they wish to subject the grades to a curve prior to grading.
If the user declines to curve the grades, the program should proceed as outlined in the Basic
Requirements.
If the user chooses to curve the grades, the program should ask the user to enter the number
grade that should be treated as a "100" for grading purposes.
Once the should enters a number, the program should use this to curve the grades using linear
interpolation. For example:If a user enters "50" as the score to use for the curve, then the
following "curved grades" should be used when assigning letters:
25 becomes 50
50 becomes 100
100 becomes 200
If a user enters "80" as the score to use for the curve, then the following "curved grades" should
be used when assigning letters:
40 becomes 50
80 becomes 100
100 becomes 125
Pay attention to possible exceptions. Make sure that your code for this feature is robust.
An example of the output produced by my solution to this assignment can be found here
When the user elects to curve the grades, the output looks like:
When an error in the data file is detected, the output looks like this.
The above files all show what is shown to the user on the screen. There is also the output
data file, of course, which contains the assigned letter grades if no error occurs. An
example of the data output file is available here.
Number Range Letter Grade
95-100 H
80-94 P
70-79 L
0-69 F

Mais conteúdo relacionado

Semelhante a Hello- Please help me answering this question by using python- Overvi.pdf

2. DD-sample.docx
2. DD-sample.docx2. DD-sample.docx
2. DD-sample.docxdpgdpg
 
C++ Tutorial
C++ TutorialC++ Tutorial
C++ Tutorialfreema48
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universitysjskjd709707
 
CampusRecruitment Django.pptx
CampusRecruitment Django.pptxCampusRecruitment Django.pptx
CampusRecruitment Django.pptxPoojaG86
 
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxPT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxamrit47
 
Program logic and design
Program logic and designProgram logic and design
Program logic and designChaffey College
 
Cis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comCis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comsholingarjosh58
 
Cis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comCis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comRobinson071
 
Cis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comCis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comStephenson01
 
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...IRJET Journal
 
1126640 question
1126640 question 1126640 question
1126640 question lpss0513
 
Car removal gold coast
Car removal gold coastCar removal gold coast
Car removal gold coastanaferral
 
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com amaranthbeg148
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docxwilcockiris
 

Semelhante a Hello- Please help me answering this question by using python- Overvi.pdf (16)

2. DD-sample.docx
2. DD-sample.docx2. DD-sample.docx
2. DD-sample.docx
 
C++ Tutorial
C++ TutorialC++ Tutorial
C++ Tutorial
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry university
 
Hw5
Hw5Hw5
Hw5
 
CampusRecruitment Django.pptx
CampusRecruitment Django.pptxCampusRecruitment Django.pptx
CampusRecruitment Django.pptx
 
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxPT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
 
Program logic and design
Program logic and designProgram logic and design
Program logic and design
 
Cis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comCis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.com
 
Cis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comCis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.com
 
Cis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comCis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.com
 
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
 
1126640 question
1126640 question 1126640 question
1126640 question
 
Car removal gold coast
Car removal gold coastCar removal gold coast
Car removal gold coast
 
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com
 
Project3
Project3Project3
Project3
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
 

Mais de gaurav444u

Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdf
Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdfHealth Care Unions Find a Voice as the Pandemic Rages - The New York T.pdf
Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdfgaurav444u
 
Health - Related Questions 1- What three pieces of information are gat.pdf
Health - Related Questions 1- What three pieces of information are gat.pdfHealth - Related Questions 1- What three pieces of information are gat.pdf
Health - Related Questions 1- What three pieces of information are gat.pdfgaurav444u
 
Health Information Technology (HIT) as Electronic Health Record (EHR).pdf
Health Information Technology (HIT) as Electronic Health Record (EHR).pdfHealth Information Technology (HIT) as Electronic Health Record (EHR).pdf
Health Information Technology (HIT) as Electronic Health Record (EHR).pdfgaurav444u
 
Headlands Limited has the following information available regarding it.pdf
Headlands Limited has the following information available regarding it.pdfHeadlands Limited has the following information available regarding it.pdf
Headlands Limited has the following information available regarding it.pdfgaurav444u
 
Header #include -string- #include -vector- #include -iostream- using.pdf
Header #include -string- #include -vector- #include -iostream-   using.pdfHeader #include -string- #include -vector- #include -iostream-   using.pdf
Header #include -string- #include -vector- #include -iostream- using.pdfgaurav444u
 
he method by which glucose is transported into a cell depends on the m.pdf
he method by which glucose is transported into a cell depends on the m.pdfhe method by which glucose is transported into a cell depends on the m.pdf
he method by which glucose is transported into a cell depends on the m.pdfgaurav444u
 
he City Council of Inman Village approved a budget with estimated reve.pdf
he City Council of Inman Village approved a budget with estimated reve.pdfhe City Council of Inman Village approved a budget with estimated reve.pdf
he City Council of Inman Village approved a budget with estimated reve.pdfgaurav444u
 
he department has expanded telehealth and device-monitoring services-.pdf
he department has expanded telehealth and device-monitoring services-.pdfhe department has expanded telehealth and device-monitoring services-.pdf
he department has expanded telehealth and device-monitoring services-.pdfgaurav444u
 
he evolution of eukaryotic cells most likely occurred in many steps- O.pdf
he evolution of eukaryotic cells most likely occurred in many steps- O.pdfhe evolution of eukaryotic cells most likely occurred in many steps- O.pdf
he evolution of eukaryotic cells most likely occurred in many steps- O.pdfgaurav444u
 
Having passed your board exam- you are now qualified to work in the pa.pdf
Having passed your board exam- you are now qualified to work in the pa.pdfHaving passed your board exam- you are now qualified to work in the pa.pdf
Having passed your board exam- you are now qualified to work in the pa.pdfgaurav444u
 
Having been lost in the desert for 2 days without water- Marion is bad.pdf
Having been lost in the desert for 2 days without water- Marion is bad.pdfHaving been lost in the desert for 2 days without water- Marion is bad.pdf
Having been lost in the desert for 2 days without water- Marion is bad.pdfgaurav444u
 
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdf
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdfHarvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdf
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdfgaurav444u
 
Harry climbed a ladder to trim some trees- While bending too fast- he.pdf
Harry climbed a ladder to trim some trees- While bending too fast- he.pdfHarry climbed a ladder to trim some trees- While bending too fast- he.pdf
Harry climbed a ladder to trim some trees- While bending too fast- he.pdfgaurav444u
 
HELP- Add button wont work-- i would click on the button and that page.pdf
HELP- Add button wont work-- i would click on the button and that page.pdfHELP- Add button wont work-- i would click on the button and that page.pdf
HELP- Add button wont work-- i would click on the button and that page.pdfgaurav444u
 
Help with this substitution program- line 3 of the output is different.pdf
Help with this substitution program- line 3 of the output is different.pdfHelp with this substitution program- line 3 of the output is different.pdf
Help with this substitution program- line 3 of the output is different.pdfgaurav444u
 
help The following information pertains to Ming Corp- at January 1- Ye.pdf
help The following information pertains to Ming Corp- at January 1- Ye.pdfhelp The following information pertains to Ming Corp- at January 1- Ye.pdf
help The following information pertains to Ming Corp- at January 1- Ye.pdfgaurav444u
 
Help Tina identify her strengths- weaknesses- the opportunities presen.pdf
Help Tina identify her strengths- weaknesses- the opportunities presen.pdfHelp Tina identify her strengths- weaknesses- the opportunities presen.pdf
Help Tina identify her strengths- weaknesses- the opportunities presen.pdfgaurav444u
 
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdf
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdfHarriet Quarterly wants a 14- return on the $15000 of assets she has i.pdf
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdfgaurav444u
 
Harriet is described as someone who -was unusual in her ability to coo.pdf
Harriet is described as someone who -was unusual in her ability to coo.pdfHarriet is described as someone who -was unusual in her ability to coo.pdf
Harriet is described as someone who -was unusual in her ability to coo.pdfgaurav444u
 
help please- thank you! i need to know the Virginia Department of Educ.pdf
help please- thank you! i need to know the Virginia Department of Educ.pdfhelp please- thank you! i need to know the Virginia Department of Educ.pdf
help please- thank you! i need to know the Virginia Department of Educ.pdfgaurav444u
 

Mais de gaurav444u (20)

Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdf
Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdfHealth Care Unions Find a Voice as the Pandemic Rages - The New York T.pdf
Health Care Unions Find a Voice as the Pandemic Rages - The New York T.pdf
 
Health - Related Questions 1- What three pieces of information are gat.pdf
Health - Related Questions 1- What three pieces of information are gat.pdfHealth - Related Questions 1- What three pieces of information are gat.pdf
Health - Related Questions 1- What three pieces of information are gat.pdf
 
Health Information Technology (HIT) as Electronic Health Record (EHR).pdf
Health Information Technology (HIT) as Electronic Health Record (EHR).pdfHealth Information Technology (HIT) as Electronic Health Record (EHR).pdf
Health Information Technology (HIT) as Electronic Health Record (EHR).pdf
 
Headlands Limited has the following information available regarding it.pdf
Headlands Limited has the following information available regarding it.pdfHeadlands Limited has the following information available regarding it.pdf
Headlands Limited has the following information available regarding it.pdf
 
Header #include -string- #include -vector- #include -iostream- using.pdf
Header #include -string- #include -vector- #include -iostream-   using.pdfHeader #include -string- #include -vector- #include -iostream-   using.pdf
Header #include -string- #include -vector- #include -iostream- using.pdf
 
he method by which glucose is transported into a cell depends on the m.pdf
he method by which glucose is transported into a cell depends on the m.pdfhe method by which glucose is transported into a cell depends on the m.pdf
he method by which glucose is transported into a cell depends on the m.pdf
 
he City Council of Inman Village approved a budget with estimated reve.pdf
he City Council of Inman Village approved a budget with estimated reve.pdfhe City Council of Inman Village approved a budget with estimated reve.pdf
he City Council of Inman Village approved a budget with estimated reve.pdf
 
he department has expanded telehealth and device-monitoring services-.pdf
he department has expanded telehealth and device-monitoring services-.pdfhe department has expanded telehealth and device-monitoring services-.pdf
he department has expanded telehealth and device-monitoring services-.pdf
 
he evolution of eukaryotic cells most likely occurred in many steps- O.pdf
he evolution of eukaryotic cells most likely occurred in many steps- O.pdfhe evolution of eukaryotic cells most likely occurred in many steps- O.pdf
he evolution of eukaryotic cells most likely occurred in many steps- O.pdf
 
Having passed your board exam- you are now qualified to work in the pa.pdf
Having passed your board exam- you are now qualified to work in the pa.pdfHaving passed your board exam- you are now qualified to work in the pa.pdf
Having passed your board exam- you are now qualified to work in the pa.pdf
 
Having been lost in the desert for 2 days without water- Marion is bad.pdf
Having been lost in the desert for 2 days without water- Marion is bad.pdfHaving been lost in the desert for 2 days without water- Marion is bad.pdf
Having been lost in the desert for 2 days without water- Marion is bad.pdf
 
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdf
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdfHarvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdf
Harvard Case Study- Humana's Bold Goal- 20 Percent Healthier by 2020 -.pdf
 
Harry climbed a ladder to trim some trees- While bending too fast- he.pdf
Harry climbed a ladder to trim some trees- While bending too fast- he.pdfHarry climbed a ladder to trim some trees- While bending too fast- he.pdf
Harry climbed a ladder to trim some trees- While bending too fast- he.pdf
 
HELP- Add button wont work-- i would click on the button and that page.pdf
HELP- Add button wont work-- i would click on the button and that page.pdfHELP- Add button wont work-- i would click on the button and that page.pdf
HELP- Add button wont work-- i would click on the button and that page.pdf
 
Help with this substitution program- line 3 of the output is different.pdf
Help with this substitution program- line 3 of the output is different.pdfHelp with this substitution program- line 3 of the output is different.pdf
Help with this substitution program- line 3 of the output is different.pdf
 
help The following information pertains to Ming Corp- at January 1- Ye.pdf
help The following information pertains to Ming Corp- at January 1- Ye.pdfhelp The following information pertains to Ming Corp- at January 1- Ye.pdf
help The following information pertains to Ming Corp- at January 1- Ye.pdf
 
Help Tina identify her strengths- weaknesses- the opportunities presen.pdf
Help Tina identify her strengths- weaknesses- the opportunities presen.pdfHelp Tina identify her strengths- weaknesses- the opportunities presen.pdf
Help Tina identify her strengths- weaknesses- the opportunities presen.pdf
 
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdf
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdfHarriet Quarterly wants a 14- return on the $15000 of assets she has i.pdf
Harriet Quarterly wants a 14- return on the $15000 of assets she has i.pdf
 
Harriet is described as someone who -was unusual in her ability to coo.pdf
Harriet is described as someone who -was unusual in her ability to coo.pdfHarriet is described as someone who -was unusual in her ability to coo.pdf
Harriet is described as someone who -was unusual in her ability to coo.pdf
 
help please- thank you! i need to know the Virginia Department of Educ.pdf
help please- thank you! i need to know the Virginia Department of Educ.pdfhelp please- thank you! i need to know the Virginia Department of Educ.pdf
help please- thank you! i need to know the Virginia Department of Educ.pdf
 

Último

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 

Último (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Hello- Please help me answering this question by using python- Overvi.pdf

  • 1. Hello, Please help me answering this question by using python. Overview For this assignment, you'll be reading grade data from a file, determining student letter grades, and writing the results to a new file. The details for how your program should work are described in the Basic Requirements and Advanced Requirements sections below. Input Data. A sample input data file of the type that your program should process is available here: sample_grade_input.txt. This sample file contains fake grade data for 14 students. However, your program should be able to work with a file with an arbitrary number of students. For example, I may test your program with just 3 students, or with 300. Your program should work for any length file. Each student record spans 3 lines in the data file. The first line contains the type of student: GRAD or UNDERGRAD. This is important because graduate and undergraduate students get graded differently at UNC. The second line contains the student's name. The third line contains the student's overall numerical grade. Your program will need to map these to letter grades according to the following rules: For the sake of this assignment, GRAD student grades are defined as follows: For the sake of this assignment, UNDERGRAD student grades are defined as follows: Please note that grades for this course are assigned as outlined in the course syllabus. The grading scales specified above are for use only in the context of this assignment. Output Data. Your program should write the results of its computations to an output file. An example of the required output file can be found here: sample_grade_output.txt. This sample file contains fake grade data for 14 students. Each student record spans 2 lines in the data file. The first line contains the student name. The second line contains the student's letter grade. Basic Requirements Your program should perform the following: Prompt the user to enter the name of the input file, making sure that the file exists and asking the user to re-enter a filename if needed. Prompt the user to enter the name of an output file. The output file should be erased/overwritten if an old one with the same name exists. Read the input file, assign grades as appropriate for the type of student (GRAD vs. UNDERGRAD), and write the output to file.
  • 2. Gracefully handle errors in the input file. In particular, your program should catch errors such as invalid numbers for grades, or student categories that are not "GRAD" or "UNDERGRAD". If found, the program should display an error message telling the user what the problem was. The program should then stop processing the rest of the data file and tell the user to fix the problems before retrying. During grading, your program will be tested with input files that have had errors intentionally introduced. It is suggested that you try this in your own testing to make sure that your program works as expected. Two kinds of output should be produced by your program. First, an output data file should be created using the same format described in the "Output Data" paragraph of the Overview section above. Second, your program will produce output on the console in the form of status messages and prompts for user input. The output produced by your program should be nearly identical to the sample output provided below. While the specific data (names, grades, etc.) will vary based on the input provided, the data formats, prompts, and messages printed to the console when using your program should match those in the sample output files to receive full credit. Please Note: Your program should use the flow control and conditional constructs that have been discussed in class to "stop processing the rest of the data file." In this way, the program should continue to run until the end, with your logic telling the program what to do (or what not to do). You should NOT use any special Python functions to "immediately stop" your program (e.g., using sys.exit() or a similar function is not allowed). Advanced Requirements Expand on the basic requirements by extending your program as follows. Allow the user if they wish to subject the grades to a curve prior to grading. If the user declines to curve the grades, the program should proceed as outlined in the Basic Requirements. If the user chooses to curve the grades, the program should ask the user to enter the number grade that should be treated as a "100" for grading purposes. Once the should enters a number, the program should use this to curve the grades using linear interpolation. For example:If a user enters "50" as the score to use for the curve, then the following "curved grades" should be used when assigning letters: 25 becomes 50 50 becomes 100 100 becomes 200 If a user enters "80" as the score to use for the curve, then the following "curved grades" should be used when assigning letters:
  • 3. 40 becomes 50 80 becomes 100 100 becomes 125 Pay attention to possible exceptions. Make sure that your code for this feature is robust. An example of the output produced by my solution to this assignment can be found here When the user elects to curve the grades, the output looks like: When an error in the data file is detected, the output looks like this. The above files all show what is shown to the user on the screen. There is also the output data file, of course, which contains the assigned letter grades if no error occurs. An example of the data output file is available here. Number Range Letter Grade 95-100 H 80-94 P 70-79 L 0-69 F